k8s组件批量启动、查看状态
生活随笔
收集整理的這篇文章主要介紹了
k8s组件批量启动、查看状态
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
查看所有master節點kube-apiserveransible k8s -m shell -a 'systemctl status kube-apiserver'重啟所有master節點kube-apiserversubprocess.call(["ansible k8s -m shell -a 'systemctl daemon-reload && systemctl restart kube-apiserver'"],shell=True)查看所有master節點所有組件狀態ansible k8s -m shell -a 'systemctl status haproxy && systemctl status keepalived && systemctl restart etcd && systemctl daemon-reload && systemctl status kube-apiserver && systemctl status kube-controller-manager && systemctl status kube-scheduler'重啟所有master節點所有組件subprocess.call(["ansible k8s -m shell -a 'systemctl daemon-reload && systemctl restart etcd && systemctl daemon-reload && systemctl restart kube-apiserver && systemctl restart kube-controller-manager && systemctl restart kube-scheduler'"],shell=True)查看worker節點所有組件狀態ansible test4 -m shell -a 'systemctl status docker && systemctl status kubelet && systemctl status kube-proxy'重啟worker節點所有組件ansible test4 -m shell -a 'systemctl daemon-reload && systemctl restart docker && systemctl daemon-reload && systemctl restart kubelet && systemctl daemon-reload && systemctl restart kube-proxy'
?
轉載于:https://www.cnblogs.com/effortsing/p/10357911.html
總結
以上是生活随笔為你收集整理的k8s组件批量启动、查看状态的全部內容,希望文章能夠幫你解決所遇到的問題。