之前重启pods的时候总是不停的敲sudo kubectl get pods, 今天发现居然有watch功能,太方便了,记录一下
sudo kubectl get pods -w -l app=zk -o wide
-w就是watch的意思
-l app=zk是过滤label=zk的pods
方便很多
qiteck@server:~/program/docker_service/zookeeper$ sudo kubectl get pods -w -l app=zk -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
zk-0 1/1 Running 0 45s 10.244.1.9 server <none> <none>
zk-1 1/1 Running 0 23s 10.244.1.10 server <none> <none>
zk-2 0/1 Pending 0 1s <none> <none> <none> <none>
zk-2 0/1 Pending 0 1s <none> server <none> <none>
zk-2 0/1 ContainerCreating 0 1s <none> server <none> <none>
zk-2 0/1 Running 0 8s 10.244.1.11 server <none> <none>
标签:kubectl,sudo,kubernetes,zk,get,server,pods From: https://www.cnblogs.com/zhanchenjin/p/17079382.html