Have create updated image with new tag for rolling but then while performing update with this command: kubectl set image deployments/hello-node-1 hello-node-1=hello-node:v2
Getting error: kubelet, minikube Warning FailedSync Error syncing pod, skipping: failed to "StartContainer" for "hello-node-1" with ErrImagePull: "rpc error: code = 2 desc = Error: image library/hello-node not found"
It looks like you didn't set the image correctly. Did you push it to the correct repository? A way to test it could be to create a new deployment that uses your newly created image.
You are referring to the wrong image. The error message shows that the kubelet is attempting to pull hello-node:v2
as an official image from docker hub (library/...
).
If you did push your image to docker hub then prefix the image name with your docker hub username.
If this is in some private repository then prefix it with a repository hostname.
If you built the image locally on the node then make sure your imagePullPolicy
in your Deployment is set to IfNotPresent
and make sure the image is actually present on all nodes this pod might be scheduled to run on.
For minikube check out this post.