I am basically trying to pull GCR images from Azure kubernetes cluster. I have the folowing for my default service account:
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
If I add the same imagePullSecret
to individual deployments, it works. So, the secret is correct. However, when I use it for a default service account, I get a ImagePullBackOff
error which on describing confirms that it's a permission issue.
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.