<p>I have an API Service running as a Docker Image and now I want to test it on Kubernetes with Docker Desktop,  but I can't get it running.
The docker image's name is <code>api_service</code></p>
<p>this is the yaml:</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-api-service
spec:
  selector:
    matchLabels:
      app: my-api-service
  replicas: 1 
  template:
    metadata:
      labels:
        app: my-api-service
    spec:
      containers:
      - name: api_service
        image: api_service
        ports:
        - containerPort: 5001
apiVersion: v1
kind: Service
metadata:
  name: my-api-service
spec:
  selector:
  ports:
    - protocol: TCP
      port: 5001
      targetPort: 5001
</code></pre>
<p>By checking with <code>kubectl get pods --all-namespaces</code>,
The status is <code>ImagePullBackOff</code>.
What am I doing wrong?</p>
<p>update:</p>
<p>calling kubectl describe:</p>
<pre><code>Name:         my-api-service-7ffdb9d6b7-x5zs8
Namespace:    default
Priority:     0
Node:         docker-desktop/192.168.65.4
Start Time:   Mon, 15 Aug 2022 13:55:47 +0200
Labels:       app=my-api-service
              pod-template-hash=7ffdb9d6b7
Annotations:  &lt;none&gt;
Status:       Pending
IP:           10.1.0.15
IPs:
  IP:           10.1.0.15
Controlled By:  ReplicaSet/my-api-service-7ffdb9d6b7
Containers:
  my-api-service:
    Container ID:   
    Image:          api_service
    Image ID:       
    Port:           5001/TCP
    Host Port:      0/TCP
    State:          Waiting
      Reason:       ImagePullBackOff
    Ready:          False
    Restart Count:  0
    Environment:    &lt;none&gt;
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-hgghw (ro)
Conditions:
  Type              Status
  Initialized       True 
  Ready             False 
  ContainersReady   False 
  PodScheduled      True 
Volumes:
  kube-api-access-hgghw:
    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  BackOff  4m37s (x413 over 99m)  kubelet  Back-off pulling image &quot;api_service&quot;
</code></pre>

stanvooz
<p>You need to have a built image in a repository and not use a local docker image. Kubernetes does not share the repository with your local docker/crd image rep. As I see, you built an image with a tag, and then you want to use it in k8s/deployment, which should not be done. You can however, link kubernetes with your local image docker repository and try it that way. But still, k8s is a big whale and doing this in production may cause grave mistakes. Please follow this <a href="https://medium.com/swlh/how-to-run-locally-built-docker-images-in-kubernetes-b28fbc32cc1d" rel="nofollow noreferrer">link</a></p>
<p>Altough anytime you dont know where the problem is, you can check the <strong>kubelet</strong> logs, as <strong>kubelet</strong> pulls the images. Depending on your k8s version, run the command to get logs from the kubelet</p>
