title: Troubleshooting Failed to pull image error Kubernetes
body: <p>So I have a private repository setup in docker which has an image which needs to be pulled by kubernetes.</p>
  <p>When I browse http://localhost:5000/v2/imagename/tags/list I can see a json with the image and its respective tag (FYI: I am using kind and helm to spin up the k8 pods in a windows machine).</p>
  <p>No matter what I try I end up with the following error:</p>
  <blockquote>
  <p>Failed to pull image &quot;localhost:5000/imagename:1.0.0&quot;: rpc error: code
  = Unknown desc = failed to pull and unpack image &quot;localhost:5000/imagename:1.0.0&quot;: failed to resolve reference
  &quot;localhost:5000/cube-airflow:1.0.0&quot;: failed to do request: Head
  http://localhost:5000/v2/imagename/manifests/1.0.0: dial tcp
  [::1]:5000: connect: connection refused</p>
  </blockquote>
  <p>How do I troubleshoot an image can be pulled via kubernetes properly? Is there a kubectl command that can do that?</p>
  <p>This is my deployment template:</p>
  <pre><code>kind: Cluster
  apiVersion: kind.x-k8s.io/v1alpha4
  containerdConfigPatches:
    - |-
      [plugins.&quot;io.containerd.grpc.v1.cri&quot;.registry.mirrors.&quot;registry:5000&quot;]
        endpoint = [&quot;http://registry:5000&quot;]
  nodes:
  - role: control-plane
  - role: worker
    kubeadmConfigPatches:
    - |
      kind: JoinConfiguration
      nodeRegistration:
        kubeletExtraArgs:
          node-labels: &quot;has-cpu=true&quot;
  - role: worker
    kubeadmConfigPatches:
    - |
      kind: JoinConfiguration
      nodeRegistration:
        kubeletExtraArgs:
          node-labels: &quot;has-gpu=true&quot;
  </code></pre>
  <p>I am trying to deploy a custom docker image for airflow in Kubernetes using its helm chart.</p>