Answers: <p>In the YAML you have pasted the <code>pullSecrets</code> line and the <code>- myRegistrKeySecretName</code> lines are commented (with <code>#</code>); if you have used exactly what you have pasted, that would be the source of the issue.</p>
  <p>Otherwise, I would check the following:</p>
  <ol>
  <li>you have actually pushed the image to docker.io with the same name and tag</li>
  <li>the ImagePullSecret is actually valid</li>
  <li>You have named it correctly in the spec (e.g., <code>myRegistrKeySecretName</code> seems to have a typo)</li>
  </ol>
  
Answers: CC BY-SA 4.0
Answers: 2023-03-13T10:01:49.733Z
Answers: Thanks for the insights, the problem was I gave `imagePullSecret` instead of `pullSecret`.
Answers: Alexy P Thomas
Answers: CC BY-SA 4.0
Answers: 2023-03-13T09:08:13.993Z
Answers: 2023-03-13T09:08:13.993Z
Answers: Amin
Answers: <p>It looks like there might be an issue with the way the imagePullSecrets is defined in your Helm values. The correct format for imagePullSecrets in the values file should be an array of secret names, and the syntax should be as follows:</p>
  <pre><code>image:
    repository: my-repository/grafana
    tag: &quot;9.4.1&quot;
    pullPolicy: IfNotPresent
  
  imagePullSecrets:
    - name: secretname
  </code></pre>
  <p>Once the secret is created and the values file is corrected, redeploy the Helm chart. This should resolve the issue with pulling the custom image.</p>
  
Answers: CC BY-SA 4.0
Answers: 2024-09-08T16:47:32.603Z
Answers: 2024-09-08T16:47:32.603Z
Answers: playwithcode
Body: <p>I'm new to grafana and prometheus, started working on it from last few days. I'm having some issues. I build a new grafana image and I am using the official helm repo to install it. On using the official image its wotking but on using my image the Pod is showing error.</p>
  <pre><code>Failed to pull image &quot;my-repository/grafana:9.4.1&quot;: rpc error: code = Unknown desc = failed to pull and unpack image &quot;docker.io/my-repository/grafana:9.4.1&quot;: failed to resolve reference &quot;docker.io/my-repository/grafana:9.4.1&quot;: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
  </code></pre>
  <p>On checking, I understood that I need to add imagePullSecret but after adding that too I'm having the issue. This is where I have added the image pull secret</p>
  <pre><code>repository: my-repository/grafana
  #Overrides the Grafana image tag whose default is the chart appVersion 
   tag: &quot;9.4.1&quot; 
   sha: &quot;&quot;
   pullPolicy: IfNotPresent
  #Optionally specify an array of imagePullSecrets.
   #Secrets must be manually created in the namespace.
   #ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
   #Can be templated.
   #pullSecrets:
   #- myRegistrKeySecretName
  imagePullSecrets:
  -name: secretname
  </code></pre>
  <p>What might be the issue here, any insights will be helpful</p>
  <p>Tried adding a docker secret with few indentations but still having the same issue.</p>
  
Tags: <docker><kubernetes><helm><grafana><kubernetes-helm>
Title: Unable to deploy grafana using helm
UserDisplayName: Alexy P Thomas
ThreadText: # Unable to deploy grafana using helm
  
  (Asked by: username_0 on 2023-03-13)
  
  I'm new to grafana and prometheus, started working on it from last few days. I'm having some issues. I build a new grafana image and I am using the official helm repo to install it. On using the official image its wotking but on using my image the Pod is showing error.
  
  ```
  Failed to pull image "my-repository/grafana:9.4.1": rpc error: code = Unknown desc = failed to pull and unpack image "docker.io/my-repository/grafana:9.4.1": failed to resolve reference "docker.io/my-repository/grafana:9.4.1": pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
  
  ```
  
  On checking, I understood that I need to add imagePullSecret but after adding that too I'm having the issue. This is where I have added the image pull secret
  
  ```
  repository: my-repository/grafana
  #Overrides the Grafana image tag whose default is the chart appVersion 
   tag: "9.4.1" 
   sha: ""
   pullPolicy: IfNotPresent
  #Optionally specify an array of imagePullSecrets.
   #Secrets must be manually created in the namespace.
   #ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
   #Can be templated.
   #pullSecrets:
   #- myRegistrKeySecretName
  imagePullSecrets:
  -name: secretname
  
  ```
  
  What might be the issue here, any insights will be helpful
  
  Tried adding a docker secret with few indentations but still having the same issue.
  
  **Tags:** docker, kubernetes, helm, grafana, kubernetes-helm
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2023-03-13. Score: 0
  
  In the YAML you have pasted the `pullSecrets` line and the `- myRegistrKeySecretName` lines are commented (with `#`); if you have used exactly what you have pasted, that would be the source of the issue.
  
  Otherwise, I would check the following:
  
  1. you have actually pushed the image to docker.io with the same name and tag
  2. the ImagePullSecret is actually valid
  3. You have named it correctly in the spec (e.g., `myRegistrKeySecretName` seems to have a typo)
  
  > **Comments:**
  > **username_0**: Thanks for the insights, the problem was I gave `imagePullSecret` instead of `pullSecret`.  
  
  ---
  
  ### Answer by username_2 on 2024-09-08. Score: 0
  
  It looks like there might be an issue with the way the imagePullSecrets is defined in your Helm values. The correct format for imagePullSecrets in the values file should be an array of secret names, and the syntax should be as follows:
  
  ```
  image:
    repository: my-repository/grafana
    tag: "9.4.1"
    pullPolicy: IfNotPresent
  
  imagePullSecrets:
    - name: secretname
  
  ```
  
  Once the secret is created and the values file is corrected, redeploy the Helm chart. This should resolve the issue with pulling the custom image.
  
  
  ---
  
  