Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

service account privileges required #5

Open
mingsterism opened this issue Apr 9, 2020 · 2 comments
Open

service account privileges required #5

mingsterism opened this issue Apr 9, 2020 · 2 comments

Comments

@mingsterism
Copy link

Hi,
How can i create the service account with the right privileges. What sort of privileges would they be?

Can I use the default service account? It seems that drone is using it by default.
My Logs below


1 | + kubectl apply -f deployment.yaml
-- | --
2 | User "default" set.
3 | Cluster "default" set.
4 | Context "default" created.
5 | Switched to context "default".
6 | unable to recognize "deployment.yaml": Unauthorized
7 | unable to recognize "deployment.yaml": Unauthorized

Thanks for the clarifications
Ming

@ynilu
Copy link
Contributor

ynilu commented Apr 13, 2020

You can create service account with an yaml file just like other Kubernetes objects.
What privileges are required depends on what you would like to do with drone-kubectl
e.g. If you want to change the replicas of a deployment, it's required to give the service account you used for drone-kubectl the permission to write deployment.

@mingsterism
Copy link
Author

how come in the code init-kubectl, it seems to hardcode the context and cluster to default. But my drone-runner is running in a different context. is there a way to change it?
Also the env PLUGIN_NAMESPACE does not seem to be used. Any ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants