Hello Techies,
I am trying to create the ngnix pod in minikube providing the yaml file but it is getting failed with ImagePullBackOff error. I am aware that Kubernetes pods sometimes experience issues when trying to pull container images from a container registry. To test this further I have try running the same using the run command which has been successful with the same image. I would like to understand what I am doing wrong here.
Using input file -
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 3m54s default-scheduler Successfully assigned default/ngnix-yaml to minikube
Normal Pulling 2m17s (x4 over 3m51s) kubelet Pulling image "ngnix"
Warning Failed 2m16s (x4 over 3m49s) kubelet Failed to pull image "ngnix": rpc error: code = Unknown desc = Error response from daemon: pull access denied for ngnix, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
Warning Failed 2m16s (x4 over 3m49s) kubelet Error: ErrImagePull
Warning Failed 2m4s (x6 over 3m49s) kubelet Error: ImagePullBackOff
Normal BackOff 110s (x7 over 3m49s) kubelet Back-off pulling image "ngnix"
using run command with same image
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 4m2s default-scheduler Successfully assigned default/nginx to minikube
Normal Pulling 4m kubelet Pulling image "nginx"
Normal Pulled 3m59s kubelet Successfully pulled image "nginx" in 1.041508696s
Normal Created 3m59s kubelet Created container nginx
Normal Started 3m58s kubelet Started container nginx
Here is the yaml file
apiVersion: v1
kind: Pod
metadata:
name: ngnix-yaml
labels:
app: nginx
tier: frontendpod
spec:
containers:
- name: ngnix
image: ngnix