<p>I'm working on a project using Helm-kubernetes and azure kubernetes service, in which I'm trying to use a simple node image which I have been pushed on azure container registry inside my helm chart but it returns <code>ImagePullBackOff</code> error.</p>

<p>Here are some details:</p>

<p><strong>My <code>Dockerfile</code>:</strong></p>

<pre><code>FROM node:8

# Create app directory
WORKDIR /usr/src/app


COPY package*.json ./

RUN npm install

# Bundle app source
COPY . .

EXPOSE 32000
CMD [ "npm", "start" ]
</code></pre>

<p><strong>My <code>helm_chart/values.yaml</code>:</strong></p>

<pre><code>replicaCount: 1

image:
  registry: helmcr.azurecr.io
  repository: helloworldtest
  tag: 0.7
  pullPolicy: IfNotPresent

nameOverride: ""
fullnameOverride: ""

service:
  name: http
  type: LoadBalancer
  port: 32000
  internalPort: 32000

ingress:
  enabled: false
  annotations: {}
    # kubernetes.io/ingress.class: nginx
    # kubernetes.io/tls-acme: "true"
  paths: []
  hosts:
    - name: mychart.local
      path: /
  tls: []

resources: {}

nodeSelector: {}

tolerations: []

affinity: {}
</code></pre>

<p>When I try to pull the image directly uasing the command below as:
<code>docker pull helmcr.azurecr.io/helloworldtest:0.7</code>
then it pulls the image successfully.</p>

<p>Whats can be wrong here?</p>

<p>Thanks in advance!</p>

Abdul Rehman
<p>Your kubernetes cluster needs to be authenticated to the container registry to pull images, generally this is done by a docker secret:</p>

<pre><code>kubectl create secret docker-registry regcred --docker-server=&lt;your-registry-server&gt; --docker-username=&lt;your-name&gt; --docker-password=&lt;your-pword&gt; --docker-email=&lt;your-email&gt;
</code></pre>

<p>If you are using AKS, you can grant cluster application id pull rights to the registry, that is enough.</p>

<p>Reading: <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>
