主节点未处于Pod状态的Pod

时间:2019-09-05 11:42:56

标签: kubernetes

在我的单个主Kubernetes 1.15集群中,某些窗格显示为NotReady状态。一些处于“就绪”和“未就绪”状态的豆荚?

如何清理处于未就绪状态的吊舱?

 # crictl pods 
POD ID              CREATED             STATE               NAME                                       NAMESPACE           ATTEMPT
7ddfd0ce6c7ea       8 hours ago         Ready               kube-proxy-vntzl                           kube-system         0
e430a86591d26       8 hours ago         Ready               calico-kube-controllers-65b8787765-rrlwv   kube-system         3
e4d6510396731       8 hours ago         Ready               coredns-5c98db65d4-gbplj                   kube-system         2
07b7eda330c7d       8 hours ago         Ready               kube-apiserver-master01                   kube-system         3
9310330074be8       8 hours ago         Ready               etcd-master01                             kube-system         3
929ea8dc9580c       8 hours ago         Ready               kube-scheduler-master01                   kube-system         3
3fb1789729499       8 hours ago         Ready               calico-node-h422j                          kube-system         3
b833585489625       8 hours ago         Ready               kube-controller-manager-master01          kube-system         3
4aef641d05712       8 hours ago         NotReady            calico-kube-controllers-65b8787765-rrlwv   kube-system         2
69f4929fe0268       8 hours ago         NotReady            coredns-5c98db65d4-gbplj                   kube-system         1
10536cc6250ee       8 hours ago         NotReady            kube-scheduler-master01                   kube-system         2
7b7023760c906       8 hours ago         NotReady            calico-node-h422j                          kube-system         2
180fba7f48d86       8 hours ago         NotReady            kube-controller-manager-master01          kube-system         2
d825333e0a833       8 hours ago         NotReady            etcd-master01                             kube-system         2
5d9d9706458d8       8 hours ago         NotReady            kube-apiserver-master01                   kube-system         2

感谢

1 个答案:

答案 0 :(得分:1)

我能够使用crictl命令删除“未就绪”窗格。

crictl pods|grep NotReady|cut -f1 -d" "|xargs -L 1 -I {} -t crictl rm {}