systemctl status docker
systemctl status etcd
systemctl status kubelet
systemctl restart kubelet
systemctl restart kube-proxy
systemctl restart kube-apiserver
systemctl restart kube-controller-manager
systemctl restart kube-scheduler
systemctl status kubelet kube-proxy kube-apiserver kube-controller-manager kube-scheduler #可同時多個服務一起查看
子節點各類服務啓停命令
systemctl restart kubelet
systemctl restart kube-proxy
systemctl status kubelet kube-proxy
查看最小節點Pod的應用情況
kubectl -s ip:port --namespace=kube-system get po
kubectl -s ip:port --namespace=kube-system get po -o wide #服務詳情
kubectl -s ip:port --namespace=kube-system get po -o wide -w #動態監控服務運行
進入容器
kubectl -s ip:port --namespace=kube-system get po
kubectl -s ip:port --namespace=kube-system exec -ti 服務名 bash
查看Pod的yaml詳細
kubectl -s ip:port --namespace=kube-system get po app-bdg5h -o yaml
查看Pod的label詳細
kubectl -s ip:port --namespace=kube-system get node --show-labels
刪除狀態爲Evicted 的Pod
kubectl -s ip:port --namespace=kube-system get pods |grep Evicted |awk'{print $1}'|xargs kubectl -s ip:port --namespace=kube-system delete pod