k8s批量删除POD命令

k8s批量删除POD命令

[cc lang=”bash”]
k8s批量删除POD命令
kubectl get pod -n kube-system | grep coredns | awk ‘{system(“kubectl delete pod “$1″ -n kube-system”)}’
kubectl get pods -o wide –all-namespaces |grep none |grep Evicted | awk ‘{system(“kubectl delete pod “$1″ -n kube-system”)}’
kubectl get pods | grep Evicted | awk ‘{print $1}’ | xargs kubectl delete pod

k8s批量删除POD脚本
#!/bin/bash
for pod in $(kubectl get pods|grep Evicted|awk ‘{print $1}’);
do
kubectl delete pods $pod
done

[/cc]

给TA打赏
共{{data.count}}人
人已打赏
容器

docker容器镜像导入导出

2020-3-12 12:42:14

k8s容器

k8s给节点打标签命令

2020-3-12 12:44:44

个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索