DEV Community

Discussion on: How to Build an ASP.NET Core C# Kubernetes Microservice Architecture with Angular on Local Docker Desktop using Ingress

Collapse
 
ratmount profile image
ratmount

Hello, Christian,

I'm trying to repeat steps described above, but I cannot deploy to k8s, after applying .yaml file I constantly getting ImagePullBackOff status for a pod. image pull error:

Events:
Type Reason Age From Message


Normal Scheduled 39s default-scheduler Successfully assigned default/pocdemo-pod-deployment-69fd9c777d-vnsks to docker-desktop
Normal SandboxChanged 37s kubelet Pod sandbox changed, it will be killed and re-created.
Normal Pulling 21s (x2 over 38s) kubelet Pulling image "pocdemo-pod:latest"
Warning Failed 21s (x2 over 37s) kubelet Failed to pull image "pocdemo-pod:latest": rpc error: code = Unknown desc = Error response from daemon: pull access denied for pocdemo-pod, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
Warning Failed 21s (x2 over 37s) kubelet Error: ErrImagePull
Normal BackOff 9s (x4 over 35s) kubelet Back-off pulling image "pocdemo-pod:latest"
Warning Failed 9s (x4 over 35s) kubelet Error: ImagePullBackOff

So, pull access denied. Why? This is the local docker repository and local cluster. I can login and logout from docker cmd. What could be a reason for this problem?

Collapse
 
praveenraghuvanshi profile image
Praveen Raghuvanshi

Try adding 'imagePullPolicy: IfNotPresent' to deployment if you are running things locally.