容器 pods

更新时间:2026年9月2日 13:56 浏览:218

强制杀列容器

kubectl delete pod -n kube-system  xxx --force --grace-period=0

批量删除容器

kubectl get pods --all-namespaces | grep Evicted | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod

kubectl get pods --all-namespaces | grep NodeAffinity | awk ' {print $2 " --namespace=" $1}' | xargs kubectl delete pod

kubectl get pods --all-namespaces | grep UnexpectedAdmissionError | awk ' {print $2 " --namespace=" $1}' | xargs kubectl delete pod
导航