作为 Kubernetes 管理员,处理 kubectl 用户身份验证的最佳方式是什么?

As a Kubernetes admin, what is the best way to handle user authentication for kubectl?

作为 Kubernetes 管理员,我目前正在尝试寻找最佳方式来吸引用户并授予他们访问 kubectl 的权限。本来打算用serviceAccounts的,但是好像不应该作为用户的认证。我一直在阅读这个:https://kubernetes.io/docs/admin/authentication/#users-in-kubernetes 但是有很多不同的方法来进行身份验证我不确定我的用例的最佳实践是什么。感谢您的帮助!

我会走证书路线。我相信大多数人在生产中使用的是我们目前使用的。我在 hard 方法中包含了一个 link,它对制作证书有更好的描述。

https://github.com/kelseyhightower/kubernetes-the-hard-way/blob/master/docs/02-certificate-authority.md

祝你好运

我最终使用 Google 使用 OpenID Connect 身份验证。我按照本指南进行了设置:https://www.skuid.com/blog/reduce-administrative-toil-with-kubernetes-1-3/.