KUBERNETES: Scale Down & Recreate CoreDNS Pods With Newly Pulled Image
Follow below steps. Please note for this steps to work, Kubernetes nodes should have access to the container registry to pull the new images.
1) On Kubernetes control node:
kubectl get pods -n kube-system >>>> make a note of replicas
kubectl scale deployment.apps/coredns -n kube-system --replicas=0
2) On all control and worker nodes, check for the coredns images and remove them. In this case we are assuming crio is the container.
crictl images
crictl rmi coredns-image
3) On the Kubernetes control node, run below steps. In below command replace replica of 2 with the number of replicas you had before in above step (1)
kubectl scale deployment.apps/coredns -n kube-system --replicas=2
No comments:
Post a Comment