k8s常用命令
# 检查各个组件状态
systemctl status kubelet
systemctl status kube-apiserver
systemctl status etcd
systemctl status kube-scheduler
systemctl status kube-proxy
1
2
3
4
5
2
3
4
5
# 清理宿主机上的容器和镜像
crictl rm $(crictl ps -a -q)
crictl rmi $(crictl images -q)
1
2
2
# 快速清理 Pod
kubectl delete pod --field-selector=status.phase=Failed
kubectl delete pod --field-selector=status.phase=Succeeded
1
2
2