Master not pods in NotReady status

9/5/2019

In my single master Kubernetes 1.15 cluster, some of the pods shows in NotReady status. some pods in Ready and in NotReady status?

How to clean up pods in NotReady status?

 # 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

Thnaks

-- sfgroups
kubernetes

1 Answer

9/5/2019

I was able to remove NotReady pods using crictl command.

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