master节点 查看node
[root@k8s-master src]# kubectl get node --namespace kube-system
NAME STATUS ROLES AGE VERSION
192.168.56.10 Ready <none> 43m v1.10.1
192.168.56.11 Ready <none> 1d v1.10.1
192.168.56.12 Ready <none> 1d v1.10.1
[root@k8s-master src]#
kubectl run net-test --image=alpine --replicas=2 sleep 360000
[root@k8s-master src]# kubectl get pod -o wide
NAME READY STATUS RESTARTS AGE IP NODE
net-test-5767cb94df-bdwtg 1/1 Running 0 24m 10.2.89.2 192.168.56.12
net-test-5767cb94df-hzkdf 1/1 Running 0 24m 10.2.69.2 192.168.56.10
[root@k8s-master src]#
得到pod的具体信息
[root@k8s-master src]# kubectl describe pod net-test-5767cb94df-bdwtg
kubectl scale deployment --replicas 1 net-test 减少
kubectl scale deployment --replicas 10 net-test 增加