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'
  • 相关阅读:
    form 编译命令
    Form文件夹开发步骤
    使用View为Data Source的Form开发要点
    spring2.0包说明【转】
    Zero to One读后感
    Fourth glance in Go
    Third glance in Go
    Second glance in Go
    First glance in Go
    MongoDB 安装
  • 原文地址:https://www.cnblogs.com/effortsing/p/10357911.html
Copyright © 2011-2022 走看看