zoukankan      html  css  js  c++  java
  • k8s组件批量启动、查看状态

    查看所有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'
  • 相关阅读:
    Servlet Filter过滤器执行顺序
    eclipse乱码问题
    如何查看servlet&jsp版本?
    Unity的shader学习2
    Unity的shader学习1
    后缀数组专题与代码模板
    哈希表/散列表 指针版模版
    图的连通性专题及模板
    一般图最大匹配--带花树
    7-15至7-17训练赛回顾
  • 原文地址:https://www.cnblogs.com/effortsing/p/10357911.html
Copyright © 2011-2022 走看看