<p>I am trying to deploy a docker image from a Private repository using Kubernetes and seeing the below error </p>

<pre><code>Waiting: CrashLoopBackoff
</code></pre>

ravi
<p>You need to pass image pull secret to kubernetes.</p>

<ol>
<li>Get docker login json</li>
<li>Create a k8s secret with this json</li>
<li>Refer a secret from a pod</li>
</ol>

<blockquote>
<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: private-reg
spec:
  containers:
  - name: private-reg-container
    image: &lt;your-private-image&gt;
  imagePullSecrets:
  - name: k8s-secret-name
</code></pre>
</blockquote>

<p>Docs: <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>Usually, the bad state caused by an image pull called <code>ImagePullBackOff</code>, so I suggest <code>kubectl get events</code> to check the root cause.</p>
