I'm new to Kubernetes and learning it these days. I'm trying to create a deployment with the help of kubectl
and every time I create a deployment, the container is not running and I get ErrImagePull
or ImagePullBackOff
.
I have tried on two machines, both have the same problem.
kubectl create deployment nginx-depl --image=nginx
Following is the description
of one of the deployments I was creating
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 23s default-scheduler Successfully assigned default/nginx-85b98978db-z6b2n to minikube
Normal Pulling 22s kubelet Pulling image "nginx"
Warning Failed 7s kubelet Failed to pull image "nginx": rpc error: code = Unknown desc = Error response from daemon: Get "https://registry-1.docker.io/v2/": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
Warning Failed 7s kubelet Error: ErrImagePull
Normal BackOff 7s kubelet Back-off pulling image "nginx"
Warning Failed 7s kubelet Error: ImagePullBackOff