I am trying to run a docker image that I have build locally with Kubernetes.
Here is my command line:
kubectl run myImage --image=myImage --port 3030 --image-pull-policy=IfNotPresent
I have seen many peoples saying that we need to add the --image-pull-policy=IfNotPresent
flag so Kubernetes can look for the image locally instead of Docker Hub, but I still get this error (from the Minikube dashboard on the pod, the service and the deployment).
Failed to pull image "myImage": rpc error: code = Unknown desc = Error response from daemon: pull access denied for myImage, repository does not exist or may require 'docker login'
But it looks like there is another issue here, I also tried --image-pull-policy=Never
and it doesn't work either.
Any idea?