码迷,mamicode.com
首页 > 其他好文 > 详细

k8s组件批量启动、查看状态

时间:2019-02-09 20:57:41      阅读:475      评论:0      收藏:0      [点我收藏+]

标签:amp   control   status   process   star   ISE   RKE   schedule   start   

查看所有master节点kube-apiserver

ansible k8s -m shell -a systemctl status kube-apiserver

重启所有master节点kube-apiserver

subprocess.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

 

k8s组件批量启动、查看状态

标签:amp   control   status   process   star   ISE   RKE   schedule   start   

原文地址:https://www.cnblogs.com/effortsing/p/10357911.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!