pod 删除

 

 

 

 

[root@cloud temperature_yaml]# kubectl get pod -o wide | grep temperature | wc -l
278
[root@cloud temperature_yaml]# kubectl get pod -o wide | grep temperature |  awk '{print $1}' | xargs kubectl delete pod

 

 

 

kubectl get pod -o wide | grep temperature |  awk '{print $1}' | xargs kubectl delete pod --force --grace-period=0

可以删掉

 

[root@cloud temperature_yaml]# kubectl get pod -o wide | grep temperature | wc -l
59
[root@cloud temperature_yaml]# kubectl get pod -o wide | grep temperature |  awk '{print $1}' | xargs kubectl delete pod --force --grace-period=0

 

从etcd中删除

 

[root@cloud temperature_yaml]# cat /etc/kubernetes/manifests/etcd.yaml | grep image
    image: k8s.gcr.io/etcd:3.4.3-0
    imagePullPolicy: IfNotPresent
[root@cloud temperature_yaml]# 

 

 

查看k8s的etcd pod中的数据

如何批量删除k8s中的deployment和pod

posted on 2021-06-08 17:49  tycoon3  阅读(65)  评论(0编辑  收藏  举报

导航