如何为 kubernetes 创建不记名令牌
How to create a bearer token for kubernetes
我在 Azure 上有一个 Kubernetes 集群,我需要将它连接到一个外部工具,这个工具需要 API 服务器地址和 Bearer 令牌,我能够得到 url api,但我找不到不记名令牌。
有人知道如何生成这个令牌吗?
不记名令牌只是来自 ServiceAccounts 的普通令牌。
Service account bearer tokens are perfectly valid to use outside the cluster and can be used to create identities for long standing jobs that wish to talk to the Kubernetes API.
你应该定义。创建一个具有限制权限的新 ServiceAccount(也许该工具有需要权限的文档)。
通常我会建议不要让任何外部工具直接连接到 API 服务器,但这取决于您。
您可以在此处查看 ServiceAccount 令牌:https://kubernetes.io/docs/reference/access-authn-authz/authentication/#service-account-tokens
我在 Azure 上有一个 Kubernetes 集群,我需要将它连接到一个外部工具,这个工具需要 API 服务器地址和 Bearer 令牌,我能够得到 url api,但我找不到不记名令牌。
有人知道如何生成这个令牌吗?
不记名令牌只是来自 ServiceAccounts 的普通令牌。
Service account bearer tokens are perfectly valid to use outside the cluster and can be used to create identities for long standing jobs that wish to talk to the Kubernetes API.
你应该定义。创建一个具有限制权限的新 ServiceAccount(也许该工具有需要权限的文档)。
通常我会建议不要让任何外部工具直接连接到 API 服务器,但这取决于您。
您可以在此处查看 ServiceAccount 令牌:https://kubernetes.io/docs/reference/access-authn-authz/authentication/#service-account-tokens