<p>On our K8S Worker node with below command have created &quot;<strong>secret</strong>&quot; to pull images from our private (Nexus) registry.</p>
<pre><code>kubectl create secret docker-registry regcred --docker-server=https://nexus-server/nexus/ --docker-username=admin --docker-password=password --docker-email=user@company.com
</code></pre>
<p>Created <strong>my-private-reg-pod.yaml</strong> in K8S Worker node, It has below.</p>
<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: test-pod
spec:
  containers:
  - name: private-reg-container
    image: nexus-server:4546/ubuntu-16:version-1
  imagePullSecrets:
  - name: regcred
</code></pre>
<p><strong>Created pod with below command</strong></p>
<pre><code>kubectl create -f my-private-reg-pod.yaml

kubectl get pods

NAME       READY   STATUS             RESTARTS   AGE
test-pod   0/1     ImagePullBackOff   0          27m

kubectl describe pod test-pod

Events:
  Type     Reason     Age                   From                   Message
  ----     ------     ----                  ----                   -------
  Normal   Scheduled  &lt;unknown&gt;             default-scheduler      Successfully assigned default/test-pod to k8s-worker01
  Warning  Failed     26m (x6 over 28m)     kubelet, k8s-worker01  Error: ImagePullBackOff
  Normal   Pulling    26m (x4 over 28m)     kubelet, k8s-worker01  Pulling image &quot;sonatype:4546/ubuntu-16:version-1&quot;
  Warning  Failed     26m (x4 over 28m)     kubelet, k8s-worker01  Failed to pull image &quot;nexus-server:4546/ubuntu-16:version-1&quot;: rpc error: code = Unknown desc = Error response from daemon: Get https://nexus-server.domain.com/nexus/v2/ubuntu-16/manifests/ver-1: no basic auth credentials
  Warning  Failed     26m (x4 over 28m)     kubelet, k8s-worker01  Error: ErrImagePull
  Normal   BackOff    3m9s (x111 over 28m)  kubelet, k8s-worker01  Back-off pulling image &quot;nexus-server:4546/ubuntu-16:version-1&quot;
</code></pre>
<p>On terminal nexus login works</p>
<pre><code>docker login nexus-server:4546

Authenticating with existing credentials...
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

Login Succeeded
</code></pre>
<p>Something i am missing with this section?</p>

<p>Since my <code>docker</code> login to nexus succeeded on terminal, So i have deleted my <code>secret</code> and created with <code>kubectl create secret generic regcred \     --from-file=.dockerconfigjson=&lt;path/to/.docker/config.json&gt; \     --type=kubernetes.io/dockerconfigjson</code> it worked.</p>
