<p>I am basically trying to pull GCR images from Azure kubernetes cluster.
I have the folowing for my default service account:</p>

<pre><code>kubectl get serviceaccounts default -o yaml                            
apiVersion: v1
imagePullSecrets:
- name: gcr-json-key-stg
kind: ServiceAccount
metadata:
  creationTimestamp: "2019-12-24T03:42:15Z"
  name: default
  namespace: default
  resourceVersion: "151571"
  selfLink: /api/v1/namespaces/default/serviceaccounts/default
  uid: 7f88785d-05de-4568-b050-f3a5dddd8ad1
secrets:
- name: default-token-gn9vb
</code></pre>

<p>If I add the same <code>imagePullSecret</code> to individual deployments, it works. So, the secret is correct. However, when I use it for a default service account, I get a <code>ImagePullBackOff</code> error which on describing confirms that it's a permission issue.</p>

<p>Am I missing something?
I have made sure that my deployment is not configured with any other specific serviceaccount and should be using the default serviceaccount.</p>

kosta
<p>ok, the problem was that the <code>default</code> service account that I added the <code>imagePullSecret</code> wasn't in the same namespace.
Once, I patched the default service account in that namespace, it works perfectly well.</p>
