Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Missing --serviceaccount external-dns for kubectl run ... in blog? #1

Open
qingvincentyin opened this issue Dec 1, 2021 · 3 comments

Comments

@qingvincentyin
Copy link

I don't understand how this line could have produced the result you showed. Where in that command does it attach the SA external-dns to the pod? I think you missed the following command line param:

kubectl run ... --serviceaccount external-dns ...
@chrisns
Copy link
Contributor

chrisns commented Feb 7, 2022

Hi @qingvincentyin sorry I missed this issue, thanks though!
You don't need that since that is the default service account in the namespace is external-dns so you get that by default.
Hope that helps, thanks 👍

@chrisns chrisns closed this as completed Feb 7, 2022
@qingvincentyin
Copy link
Author

the default service account in the namespace is external-dns

The default SA in every namespace is named default. As far as I know, there's no way to change the name default to another name such as external-dns as you stated. So, in order to associate a non-default SA to a pod, the pod must explicitly reference it; hence, --serviceaccount external-dns is necessary for kubectl run as I stated above.

Put it another way, where in your code (elsewhere) did you manage to switch the default assignment of SA (again, I'm not aware of a way to do it.)

@chrisns
Copy link
Contributor

chrisns commented Feb 8, 2022

Yup. Fair point, that sounds more right than my memory;)

I'll replay the code and figure out how I got to that asap

@chrisns chrisns reopened this Feb 8, 2022
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants