K8S命令记录
1. 查看集群信息
kubectl cluster-info
2. 高可用VIP服务的文件服务
ll /etc/kubernetes/manifests
3.所有get指令均可以加上-A查看所有命名空间
kubectl get po -A
4.删除污点
kubectl uncordon 192.17.6.6
4.添加污点
kubectl cordon 192.17.6.6
5.查询客户端和服务端的版本
kubectl version --short=true
6. 查询pod个数
kubectl get pod --all-namespaces -o wide |grep 20.1.0.43 |wc -l
7.查询ingressRoute
[root@paas1 ~]# kubectl get ingressRoute -n testbuild
NAME AGE
testbuild-http-route 17h
8.设置多副本
kubectl scale deployment -n dataos barmonitor-web-dataos-90 --replicas=1
9.查询运行正常之外的pod
kubectl get pod -n edos |grep -v Running
10.k8s v1.11.1 kubectl get pod -n edos -o wide 如何查询 RESTARTS 不等于0的
kubectl get pod -n edos-o=jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.status.containerStatuses[0].restartCount}{"\n"}{end}' | awk '$2!=0'