<p>While trying to deploy my custom nginx image from local registry to kubernetes , I am seeing below error in kubernetes-dashboard -</p>

<p>Failed to pull image "myapp": rpc error: code = Unknown desc = Error response from daemon: repository myapp not found: does not exist or no pull access</p>

<p>This is the steps I followed -</p>

<pre><code>1) Built my customer image using docker
2) kubectl run myapp --image=myapp --port=80 --image-pull-policy=IfNotPresent
3) kubectl expose deployment myapp --type=LoadBalancer --port=80 --target-port=80 --name=myapp
</code></pre>

<p>In Kubernetes-dashboard, I see deployment showing failure due to above error of repository myapp not found.</p>

<p>I even tried to add this steps mentioned in <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>

<pre><code>docker login
kubectl create secret docker-registry regcred --docker-server=https://index.docker.io/v1/ --docker-username=xxx --docker-password=xxx --docker-email=xxx
</code></pre>

<p>But still same issue.</p>

<p>What should I do for pod to get my local repo in GKE.
Appreciate any help. Thanks.</p>

<p>Here is the more info as requested by rjdkolb -</p>

<pre><code>xxx@cloudshell:~ (involuted-ratio-227118)$ kubectl describe pod myapp-7cf96cf48-vsqb5
Name:           myapp-7cf96cf48-vsqb5
Namespace:      default
Node:           gke-standard-cluster-1-default-pool-c7d671ed-br8j/10.142.0.3
Start Time:     Wed, 09 Jan 2019 22:28:58 +0530
Labels:         pod-template-hash=379527904
                run=myapp
Annotations:    kubernetes.io/limit-ranger=LimitRanger plugin set: cpu request for container myapp
Status:         Pending
IP:             10.48.8.9
Controlled By:  ReplicaSet/myapp-7cf96cf48
Containers:
  myapp:
    Container ID:
    Image:          mynginx
    Image ID:
    Port:           80/TCP
    Host Port:      0/TCP
    State:          Waiting
      Reason:       ImagePullBackOff
    Ready:          False
    Restart Count:  0
    Requests:
      cpu:        100m
    Environment:  &lt;none&gt;
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-8p622 (ro)
Conditions:
  Type           Status
  Initialized    True
  Ready          False
  PodScheduled   True
Volumes:
  default-token-8p622:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  default-token-8p622
    Optional:    false
QoS Class:       Burstable
Node-Selectors:  &lt;none&gt;
Tolerations:     node.kubernetes.io/not-ready:NoExecute for 300s
                 node.kubernetes.io/unreachable:NoExecute for 300s
Events:
  Type     Reason                 Age              From                                                        Message
  ----     ------                 ----             ----                                                        -------
  Normal   Scheduled              4m               default-scheduler                                           Successfully assigned myapp-7cf96cf48-vsqb5 to gke-standard-cluster-1-default-pool-c7d671ed-br8j
  Normal   SuccessfulMountVolume  4m               kubelet, gke-standard-cluster-1-default-pool-c7d671ed-br8j  MountVolume.SetUp succeeded for volume "default-token-8p622"
  Normal   Pulling                2m (x4 over 4m)  kubelet, gke-standard-cluster-1-default-pool-c7d671ed-br8j  pulling image "mynginx"
  Warning  Failed                 2m (x4 over 4m)  kubelet, gke-standard-cluster-1-default-pool-c7d671ed-br8j  Failed to pull image "mynginx": rpc error: code = Unknown desc = Error response from daemon: repository mynginx not found: does not exist or no pull access
  Warning  Failed                 2m (x4 over 4m)  kubelet, gke-standard-cluster-1-default-pool-c7d671ed-br8j  Error: ErrImagePull
  Normal   BackOff                2m (x6 over 4m)  kubelet, gke-standard-cluster-1-default-pool-c7d671ed-br8j  Back-off pulling image "mynginx"
  Warning  Failed                 2m (x6 over 4m)  kubelet, gke-standard-cluster-1-default-pool-c7d671ed-br8j  Error: ImagePullBackOff
</code></pre>

Gopi
<p>The issue here is your pod is going on the worker node and worker node doesn't have <code>mynginx</code> image present.</p>

<p>You need to copy the mynginx image from master node to worker node as follows:</p>

<p>Run following command on master node:</p>

<pre><code>docker save -o &lt;path for generated tar file&gt; mynginx
</code></pre>

<p>Now copy the generated tar file to the worker node and load that image using following command:</p>

<pre><code>docker load -i &lt;path to image tar file&gt;
</code></pre>

<p>This will load the <code>mynginx</code> image on your worker node and it will resolve your issue</p>
