Kubernetes 常用命令
作者:互联网
1.查看节点状态
[root@master1 ~]# kubectl get nodes
NAME STATUS ROLES AGE VERSION
master1 Ready master 113m v1.14.2
master2 Ready master 105m v1.14.2
master3 Ready master 102m v1.14.2
node1 Ready <none> 101m v1.14.2
node2 Ready <none> 43m v1.14.2
node3 Ready <none> 43m v1.14.2
2.查看系统静态pod运行情况
[root@master1 ~]# kubectl get pods -n kube-system -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
calico-kube-controllers-67d686764b-qml54 1/1 Running 0 98m 10.101.149.3 node1 <none> <none>
calico-node-5kzpp 1/1 Running 0 98m 192.168.3.132 master2 <none> <none>
calico-node-czwrh 1/1 Running 0 98m 192.168.3.133 master3 <none> <none>
calico-node-dsgcf 1/1 Running 0 45m 192.168.3.142 node2 <none> <none>
calico-node-hrxbv 1/1 Running 0 98m 192.168.3.141 node1 <none> <none>
calico-node-j22pl 1/1 Running 0 44m 192.168.3.143 node3 <none> <none>
calico-node-s2jbl 1/1 Running 0 98m 192.168.3.131 master1 <none> <none>
coredns-d5947d4b-6t2vs 1/1 Running 0 114m 10.101.149.1 node1 <none> <none>
coredns-d5947d4b-sgmfb 1/1 Running 0 114m 10.101.149.2 node1 <none> <none>
etcd-master1 1/1 Running 0 113m 192.168.3.131 master1 <none> <none>
etcd-master2 1/1 Running 0 107m 192.168.3.132 master2 <none> <none>
etcd-master3 1/1 Running 0 104m 192.168.3.133 master3 <none> <none>
kube-apiserver-master1 1/1 Running 0 113m 192.168.3.131 master1 <none> <none>
kube-apiserver-master2 1/1 Running 0 107m 192.168.3.132 master2 <none> <none>
kube-apiserver-master3 1/1 Running 0 103m 192.168.3.133 master3 <none> <none>
kube-controller-manager-master1 1/1 Running 2 113m 192.168.3.131 master1 <none> <none>
kube-controller-manager-master2 1/1 Running 0 107m 192.168.3.132 master2 <none> <none>
kube-controller-manager-master3 1/1 Running 0 103m 192.168.3.133 master3 <none> <none>
kube-proxy-6h6gc 1/1 Running 0 39m 192.168.3.142 node2 <none> <none>
kube-proxy-hb498 1/1 Running 0 39m 192.168.3.132 master2 <none> <none>
kube-proxy-l8csf 1/1 Running 0 40m 192.168.3.143 node3 <none> <none>
kube-proxy-p96nn 1/1 Running 0 39m 192.168.3.141 node1 <none> <none>
kube-proxy-qf8ql 1/1 Running 0 39m 192.168.3.131 master1 <none> <none>
kube-proxy-xhgqw 1/1 Running 0 39m 192.168.3.133 master3 <none> <none>
kube-scheduler-master1 1/1 Running 1 113m 192.168.3.131 master1 <none> <none>
kube-scheduler-master2 1/1 Running 0 107m 192.168.3.132 master2 <none> <none>
kube-scheduler-master3 1/1 Running 0 103m 192.168.3.133 master3 <none> <none>
标签:master1,master3,master2,Kubernetes,192.168,Running,常用命令,kube 来源: https://blog.csdn.net/weixin_42595012/article/details/98639020