0

When we do not specify any service account in the deployment/pod manifests, it gets associated with the "default" service account in the corresponding namespace.

My question is, can this behavior be changed so that by default, the deployment/pod gets associated with a custom service account in the pods namespace (without needing to specify the custom service account in each deployment/pod manifests)?

Any links to documentation on achieving this would be helpful.

Visa2Learn
  • 13
  • 3

1 Answers1

0

I think you can resolve it from another side.

I assume the account you're expecting is named 'custom', then override the default yaml with the custom yaml.

$ kubectl edit serviceaccount default -n namespace

then paste content of 'custom'.

HKBN-ITDS
  • 609
  • 1
  • 6