针对 oidc 和 k8s 的显式配置



我已经用kubeadm设置了k8s单节点集群。我已经用它配置了oidc并对~/.kube/config文件进行了更改。是否必须对 kubectl 上下文或凭据进行任何显式配置?

我已将用户、客户端 ID、客户端机密、id_token 和刷新 id 添加到/.kube/config 文件中。 除此之外,我还添加了oidc-issuer-url,oidc-username-claim和oidc-client-id到kube-apiserver.yaml文件。

除此之外,还有什么需要添加的吗?我假设我错过了一些东西,因此当我尝试命令时我error: You must be logged in to the server (the server has asked for the client to provide credentials)kubectl --user=name@gmail.com get nodes

您可以查看APIServer的日志,以检查在身份验证过程中遇到什么错误。

您应该在apiserver.yaml中添加oidc-issuer-url,oidc-username-claim,oidc-client-id和--oidc-ca-file。

最新更新