<p>Once I installed docker and run it, I install kubernetes also, then I installed minikube and start it. I create some deployments by <strong>kubectl create deployment --image=imageName imageName</strong>
when I get the pods I these results, I want a solution
I tried to understand kubernetes errors but I did not, <strong>when I get my pods I get these</strong>: <br></p>
<pre><code>PS C:\Users\ahmed&gt; kubectl get pods
NAME                        READY   STATUS         RESTARTS   AGE
depl-im-54cbb55ccb-mjl6q    0/1     ErrImagePull   0          86m
ngnix-app-8d489bb64-tlvrn   0/1     ErrImagePull   0          15h
</code></pre>
<p>And when describe one (<em><strong>like 'ngnix-app-8d489bb64-tlvrn'</strong></em>) I get: <br></p>
<pre><code>PS C:\Users\ahmed&gt; kubectl describe pod depl-im-54cbb55ccb-mjl6q

Name:depl-im-54cbb55ccb-mjl6q

Namespace:    default

Priority:     0

Node:         minikube/192.168.49.2

Start Time:   Sat, 01 Jan 2022 12:26:05 +0200

Labels:       app=depl-im
              pod-template-hash=54cbb55ccb

Annotations:  &lt;none&gt;
Status:       Pending

IP:           172.17.0.4
IPs:
  IP:           172.17.0.4
Controlled By:  ReplicaSet/depl-im-54cbb55ccb

Containers:
  depl-im:
    Container ID:
    Image:          depl-im
    Image ID:
    Port:           &lt;none&gt;
    Host Port:      &lt;none&gt;
    State:          Waiting
      Reason:       ImagePullBackOff
    Ready:          False
    Restart Count:  0
    Environment:    &lt;none&gt;


Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-b9f8h (ro)

Conditions:
  Type              Status
  Initialized       True
  Ready             False
  ContainersReady   False
  PodScheduled      True

Volumes:
  kube-api-access-b9f8h:
    Type:                    Projected (a volume that contains injected data from multiple sources)
    TokenExpirationSeconds:  3607
    ConfigMapName:           kube-root-ca.crt
    ConfigMapOptional:       &lt;nil&gt;
    DownwardAPI:             true
QoS Class:                   BestEffort
Node-Selectors:              &lt;none&gt;
Tolerations:                 node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
                             node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
  Type     Reason          Age                  From               Message
  ----     ------          ----                 ----               -------
  Normal   Scheduled       86m                  default-scheduler  Successfully assigned default/depl-im-54cbb55ccb-mjl6q to minikube
  Normal   Pulling         84m (x4 over 86m)    kubelet            Pulling image &quot;depl-im&quot;
  Warning  Failed          84m (x4 over 86m)    kubelet            Failed to pull image &quot;depl-im&quot;: rpc error: code = Unknown desc = Error response from daemon: pull access denied for depl-im, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
  Warning  Failed          84m (x4 over 86m)    kubelet            Error: ErrImagePull
  Warning  Failed          84m (x6 over 86m)    kubelet            Error: ImagePullBackOff
  Normal   BackOff         56m (x128 over 86m)  kubelet            Back-off pulling image &quot;depl-im&quot;
  Normal   SandboxChanged  114s                 kubelet            Pod sandbox changed, it will be killed and re-created.
  Normal   BackOff         33s (x2 over 61s)    kubelet            Back-off pulling image &quot;depl-im&quot;
  Warning  Failed          33s (x2 over 61s)    kubelet            Error: ImagePullBackOff
  Normal   Pulling         18s (x3 over 80s)    kubelet            Pulling image &quot;depl-im&quot;
  Warning  Failed          15s (x3 over 62s)    kubelet            Failed to pull image &quot;depl-im&quot;: rpc error: code = Unknown desc = Error response from daemon: pull access denied for depl-im, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
  Warning  Failed          15s (x3 over 62s)    kubelet            Error: ErrImagePull
</code></pre>

Ahmed Magdy
<p>If this image that kubernetes tries to pull is hosted by a private image repository, you need to place a secret that includes the credentials in the same kubernetes namespace where your deployments / pods are deployed in.</p>
<p>Then, use</p>
<pre class="lang-yaml prettyprint-override"><code>imagePullSecrets:
  - name: secret-name
</code></pre>
<p>in your deployment spec.</p>
<p>For reference: <a href="https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/" rel="nofollow noreferrer">https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/</a></p>
<p>If you try to use a locally built docker image in Kubernetes, please have a look at the following: <a href="https://medium.com/swlh/how-to-run-locally-built-docker-images-in-kubernetes-b28fbc32cc1d" rel="nofollow noreferrer">https://medium.com/swlh/how-to-run-locally-built-docker-images-in-kubernetes-b28fbc32cc1d</a></p>
