kubernetes批量删除pod和批量强制删除pod

1.批量删除pod
kubectl -n kube-system get po | awk ‘{print $1}’ | xargs kubectl --kubeconfig=/etc/kubernetes/kubeconfig -n kube-system delete po
2.批量强制删除pod
kubectl get po -A -o wide | grep Terminating | awk ‘{print $2}’ | xargs kubectl --kubeconfig=/etc/kubernetes/kubeconfig -n kube-system delete po --grace-period=0 --force

你可能感兴趣的:(云原生)