k8s批量删除POD命令

1
2
3
4
5
6
7
8
9
10
11
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

人已赞赏
容器

docker容器镜像导入导出

2020-3-12 12:42:14

k8s容器

k8s给节点打标签命令

2020-3-12 12:44:44

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