1.强制删除特定pods
#kubectl delete pods cloudagile-mariadb-0 -n intelligence-data-lab –grace-period=0 --force
2.删除集群失败的pods
#kubectl get pods --field-selector=status.phase=Failed --all-namespaces |awk ‘{ system("kubectl delete pod “$2” -n "$1) }’
3.强制删除Terminating状态的pods
#kubectl get pods --all-namespaces |grep Terminating||grep -w “0/1”|awk ‘{ system(“kubectl delete pod “$2” -n “$1” --grace-period=0 --force”) }’

Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐