TokenRequest
apiVersion: authentication.k8s.io/v1
import "k8s.io/api/authentication/v1"
TokenRequest
TokenRequest 请求一个服务账户的 token。
apiVersion: authentication.k8s.io/v1
kind: TokenRequest
metadata (ObjectMeta)
标准对象的元数据。更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
spec (TokenRequestSpec), required
Spec 包含有关正在评估的请求的信息
status (TokenRequestStatus)
Status 由服务器填充,指示 token 是否可以被认证。
TokenRequestSpec
TokenRequestSpec 包含 token 请求的客户端提供的参数。
audiences ([]string), required
原子性:在合并期间将被替换
Audiences 是 token 的预期受众。Token 的接收者必须使用 Token 的受众列表中的标识符来识别自己,否则应拒绝该 Token。为多个受众颁发的 Token 可用于针对列出的任何受众进行身份验证,但暗示目标受众之间的高度信任。
boundObjectRef (BoundObjectReference)
BoundObjectRef 是一个指向 token 将要绑定的对象的引用。Token 的有效期仅限于绑定对象存在的时间。注意:API 服务器的 TokenReview 端点会验证 BoundObjectRef,但其他受众可能不会。如果希望及时撤销,请将 ExpirationSeconds 设置得较小。
BoundObjectReference 是一个指向 token 所绑定对象的引用。
boundObjectRef.apiVersion (string)
被引用对象的 API 版本。
boundObjectRef.kind (string)
被引用对象的 Kind。有效的 Kind 是 'Pod' 和 'Secret'。
boundObjectRef.name (string)
被引用对象的名称。
boundObjectRef.uid (string)
被引用对象的 UID。
expirationSeconds (int64)
ExpirationSeconds 是请求的有效期。Token 发行者可能会返回一个具有不同有效期的 Token,因此客户端需要检查响应中的 'expiration' 字段。
TokenRequestStatus
TokenRequestStatus 是 token 请求的结果。
expirationTimestamp (Time), required
ExpirationTimestamp 是返回的 token 的过期时间。
Time 是 time.Time 的一个包装器,支持正确地编组到 YAML 和 JSON。提供了 time 包提供的许多工厂方法的包装器。
token (string), required
Token 是不透明的持有者 token。
操作
create
创建 ServiceAccount 的 token
HTTP 请求
POST /api/v1/namespaces/{namespace}/serviceaccounts/{name}/token
参数
name (在路径中): string,必填
TokenRequest 的名称
namespace (在路径中): string,必填
body: TokenRequest, required
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
pretty (在查询中): string
响应
200 (TokenRequest): OK
201 (TokenRequest): Created
202 (TokenRequest): Accepted
401: 未授权
本页面是自动生成的。
如果你打算报告此页面存在的问题,请在问题描述中提及此页面是自动生成的。修复可能需要在 Kubernetes 项目的其他地方进行。