DO Kubernetes: How to authorize a user or revoke/reset certificate

I would like to know how we can grant additional user access to the Kubernetes cluster. Currently the kubeconfig you can download works well with kubectl. It is also good that it’s only 7 days valid. This prevents people from using the config where they should actually use a Kubernetes Service account.

However, I’d like to know if it’s possible to create additional kubectl users, or if it’s possible to force-reset the kubeconfig credentials generated by DigitalOcean. This way, we can securely and safely remove people from our team, knowing they will not have access to the Kubernetes cluster anymore.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi there,

We currently don’t have a great story around authentication to a DOKS cluster at the moment. There is currently no way to revoke a user access. As you mentioned, this isn’t exactly what service accounts are meant to/should be used for. This issue has been raised to engineering and is on their backlog for review.


John Kwiatkoski Senior Developer Support Engineer

I am also looking for a solution to this.

A cluster admin is able to create new users by generating CertificateSigningRequest and using kubectl to aprove/deny the certificate, the problem is that once the CSR is approved we no longer have any way to remove this user from the cluster or to update the certificates. This doesn’t seem a good approach.

ServiceAccount are also not mean for this goal.

I don’t see how RBAC is resolving this problem, maybe would be good to create a tutorial for this, I see several people looking for the same.

@jarland is there a way to clarify this?


If someone else has a more complete answer I welcome it, but I wanted to do my best to offer one. I asked one of our team members and fellow Kubernetes experts about this, and they told me that this should function for your use case: