PodCertificateRequest v1alpha1
apiVersion: certificates.k8s.io/v1alpha1
import "k8s.io/api/certificates/v1alpha1"
PodCertificateRequest
PodCertificateRequest 编码了 Pod 请求从给定签名者处获取证书。
Kubelet 使用此 API 来实现 podCertificate 投影卷。
apiVersion: certificates.k8s.io/v1alpha1
kind: PodCertificateRequest
metadata (ObjectMeta)
metadata 包含对象元数据。
spec (PodCertificateRequestSpec), 必需
spec 包含关于所请求证书的详细信息。
status (PodCertificateRequestStatus)
status 包含已颁发的证书以及一组标准的条件。
PodCertificateRequestSpec
PodCertificateRequestSpec 描述了证书请求。所有字段在创建后都不可变。
nodeName (string), 必需
nodeName 是 Pod 分配到的节点的名称。
nodeUID (string), 必需
nodeUID 是 Pod 分配到的节点的 UID。
pkixPublicKey ([]byte), 必需
pkixPublicKey 是签名者将颁发证书的 PKIX 序列化公钥。
密钥必须是 RSA3072、RSA4096、ECDSAP256、ECDSAP384、ECDSAP521 或 ED25519 之一。请注意,此列表未来可能会扩展。
签名者实现不需要支持 kube-apiserver 和 kubelet 支持的所有密钥类型。如果签名者不支持给定的 PodCertificateRequest 中使用的密钥类型,则必须通过设置类型为“Denied”、原因为“UnsupportedKeyType”的状态条件条目来拒绝该请求。它还可以在 message 字段中建议其支持的密钥类型。
podName (string), 必需
podName 是证书将挂载到的 Pod 的名称。
podUID (string), 必需
podUID 是证书将挂载到的 Pod 的 UID。
proofOfPossession ([]byte), 必需
proofOfPossession 证明请求的 kubelet 拥有与 pkixPublicKey 对应的私钥。
它是通过使用
pkixPublicKey
对 Pod UID 的 ASCII 字节进行签名来构造的。kube-apiserver 在创建 PodCertificateRequest 时验证 possession 证明。
如果密钥是 RSA 密钥,则签名是对 Pod UID 的 ASCII 字节进行签名,使用 RFC 8017 中的 RSASSA-PSS(由 golang 函数 crypto/rsa.SignPSS with nil options 实现)。
如果密钥是 ECDSA 密钥,则签名如 SEC 1, Version 2.0 所述(由 golang 库函数 crypto/ecdsa.SignASN1 实现)。
如果密钥是 ED25519 密钥,则签名如 ED25519 规范所述(由 golang 库 crypto/ed25519.Sign 实现)。
serviceAccountName (string), 必需
serviceAccountName 是 Pod 正在运行的服务帐户的名称。
serviceAccountUID (string), 必需
serviceAccountUID 是 Pod 正在运行的服务帐户的 UID。
signerName (string), 必需
signerName 指示请求的签名者。
所有以
kubernetes.io
开头的签名者名称都保留给 Kubernetes 项目使用。目前,Kubernetes 项目记录了一个名为kubernetes.io/kube-apiserver-client-pod
的已知签名者,它将颁发 kube-apiserver 可理解的客户端证书。该功能目前尚未实现。maxExpirationSeconds (int32)
maxExpirationSeconds 是证书允许的最大有效期。
如果省略,kube-apiserver 将其设置为 86400(24 小时)。kube-apiserver 将拒绝小于 3600(1 小时)的值。最大允许值为 7862400(91 天)。
签名者实现可以自由地颁发有效期短于 MaxExpirationSeconds 但不短于 3600 秒(1 小时)的证书。此约束由 kube-apiserver 强制执行。
kubernetes.io
签名者绝不会颁发有效期超过 24 小时的证书。
PodCertificateRequestStatus
PodCertificateRequestStatus 描述了请求的状态,如果请求已颁发,则包含证书数据。
beginRefreshAt (Time)
beginRefreshAt 是 kubelet 应该开始尝试刷新证书的时间。此字段通过 /status 子资源设置,并且必须与 certificateChain 同时设置。一旦填充,此字段不可变。
此字段仅作为提示。Kubelet 必要时可能会在此时间之前或之后开始刷新。
Time 是 time.Time 的一个包装器,支持正确地编组到 YAML 和 JSON。提供了 time 包提供的许多工厂方法的包装器。
certificateChain (string)
certificateChain 由签名者填充已颁发的证书。此字段通过 /status 子资源设置。一旦填充,此字段不可变。
如果证书签名请求被拒绝,则会添加一个类型为“Denied”的条件,此字段将保持为空。如果签名者无法颁发证书,则会添加一个类型为“Failed”的条件,此字段将保持为空。
验证要求
- certificateChain 必须由一个或多个 PEM 格式的证书组成。
- 每个条目必须是 RFC5280 第 4 节所述的有效 PEM 包装的 DER 编码 ASN.1 证书。
如果存在多个块,并且所请求的 spec.signerName 的定义没有另行说明,则第一个块是已颁发的证书,后续块应被视为中间证书并在 TLS 握手中提供。在将链投影到 Pod 卷时,kubelet 将删除 PEM 块之间的任何数据以及任何 PEM 块头。
conditions ([]Condition)
补丁策略:按键
type
合并映射:合并时将保留键类型上的唯一值
应用于请求的条件。
“Issued”、“Denied”和“Failed”类型具有特殊处理。最多可以存在一个此类条件,并且其状态必须为“True”。
如果请求因
Reason=UnsupportedKeyType
而被拒绝,签名者可以在 message 字段中建议一个可行的密钥类型。Condition 包含此 API 资源当前状态的一个方面的详细信息。
conditions.lastTransitionTime (Time),必需
lastTransitionTime 是条件上次从一种状态转换到另一种状态的时间。这应该是底层条件发生变化的时间。如果不知道,则使用 API 字段发生变化的时间是可接受的。
Time 是 time.Time 的一个包装器,支持正确地编组到 YAML 和 JSON。提供了 time 包提供的许多工厂方法的包装器。
conditions.message (string),必需
message 是一个人类可读的消息,指示有关转换的详细信息。这可能是一个空字符串。
conditions.reason (string),必需
reason 包含一个指示条件最后一次转换原因的编程标识符。特定条件类型的生产者可以定义此字段的预期值和含义,以及这些值是否被视为保证的 API。该值应为 CamelCase 字符串。此字段不能为空。
conditions.status (string),必需
条件状态,True、False、Unknown 之一。
conditions.type (string),必需
条件类型,CamelCase 或 foo.example.com/CamelCase。
conditions.observedGeneration (int64)
observedGeneration 表示条件是基于 .metadata.generation 设置的。例如,如果 .metadata.generation 当前为 12,但 .status.conditions[x].observedGeneration 为 9,则该条件相对于实例的当前状态已过时。
notAfter (Time)
notAfter 是证书过期的日期。该值必须与 certificateChain 中叶子证书的 notAfter 值相同。此字段通过 /status 子资源设置。一旦填充,它就不可变。签名者必须在设置 certificateChain 的同时设置此字段。
Time 是 time.Time 的一个包装器,支持正确地编组到 YAML 和 JSON。提供了 time 包提供的许多工厂方法的包装器。
notBefore (Time)
notBefore 是证书生效的日期。该值必须与 certificateChain 中叶子证书的 notBefore 值相同。此字段通过 /status 子资源设置。一旦填充,它就不可变。签名者必须在设置 certificateChain 的同时设置此字段。
Time 是 time.Time 的一个包装器,支持正确地编组到 YAML 和 JSON。提供了 time 包提供的许多工厂方法的包装器。
PodCertificateRequestList
PodCertificateRequestList 是 PodCertificateRequest 对象的集合
apiVersion: certificates.k8s.io/v1alpha1
kind: PodCertificateRequestList
metadata (ListMeta)
metadata 包含列表元数据。
items ([]PodCertificateRequest), 必需
items 是 PodCertificateRequest 对象的集合
操作
get
读取指定的 PodCertificateRequest
HTTP 请求
GET /apis/certificates.k8s.io/v1alpha1/namespaces/{namespace}/podcertificaterequests/{name}
参数
name (在路径中): string,必填
PodCertificateRequest 的名称
namespace (在路径中): string,必填
pretty (在查询中): string
响应
200 (PodCertificateRequest): OK
401: 未授权
get
读取指定的 PodCertificateRequest 的状态
HTTP 请求
GET /apis/certificates.k8s.io/v1alpha1/namespaces/{namespace}/podcertificaterequests/{name}/status
参数
name (在路径中): string,必填
PodCertificateRequest 的名称
namespace (在路径中): string,必填
pretty (在查询中): string
响应
200 (PodCertificateRequest): OK
401: 未授权
list
列出或监视 PodCertificateRequest 类型的对象
HTTP 请求
GET /apis/certificates.k8s.io/v1alpha1/namespaces/{namespace}/podcertificaterequests
参数
namespace (在路径中): string,必填
allowWatchBookmarks (在查询中): boolean
continue (在查询中): string
fieldSelector (在查询中): string
labelSelector (在查询中): string
limit (在查询中): integer
pretty (在查询中): string
resourceVersion (在查询中): string
resourceVersionMatch (在查询中): string
sendInitialEvents (在查询中): boolean
timeoutSeconds (在查询中): integer
watch (在查询中): boolean
响应
200 (PodCertificateRequestList): OK
401: 未授权
list
列出或监视 PodCertificateRequest 类型的对象
HTTP 请求
GET /apis/certificates.k8s.io/v1alpha1/podcertificaterequests
参数
allowWatchBookmarks (在查询中): boolean
continue (在查询中): string
fieldSelector (在查询中): string
labelSelector (在查询中): string
limit (在查询中): integer
pretty (在查询中): string
resourceVersion (在查询中): string
resourceVersionMatch (在查询中): string
sendInitialEvents (在查询中): boolean
timeoutSeconds (在查询中): integer
watch (在查询中): boolean
响应
200 (PodCertificateRequestList): OK
401: 未授权
create
创建一个 PodCertificateRequest
HTTP 请求
POST /apis/certificates.k8s.io/v1alpha1/namespaces/{namespace}/podcertificaterequests
参数
namespace (在路径中): string,必填
body: PodCertificateRequest, 必需
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
pretty (在查询中): string
响应
200 (PodCertificateRequest): OK
201 (PodCertificateRequest): Created
202 (PodCertificateRequest): Accepted
401: 未授权
update
替换指定的 PodCertificateRequest
HTTP 请求
PUT /apis/certificates.k8s.io/v1alpha1/namespaces/{namespace}/podcertificaterequests/{name}
参数
name (在路径中): string,必填
PodCertificateRequest 的名称
namespace (在路径中): string,必填
body: PodCertificateRequest, 必需
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
pretty (在查询中): string
响应
200 (PodCertificateRequest): OK
201 (PodCertificateRequest): Created
401: 未授权
update
替换指定的 PodCertificateRequest 的状态
HTTP 请求
PUT /apis/certificates.k8s.io/v1alpha1/namespaces/{namespace}/podcertificaterequests/{name}/status
参数
name (在路径中): string,必填
PodCertificateRequest 的名称
namespace (在路径中): string,必填
body: PodCertificateRequest, 必需
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
pretty (在查询中): string
响应
200 (PodCertificateRequest): OK
201 (PodCertificateRequest): Created
401: 未授权
patch
部分更新指定的 PodCertificateRequest
HTTP 请求
PATCH /apis/certificates.k8s.io/v1alpha1/namespaces/{namespace}/podcertificaterequests/{name}
参数
name (在路径中): string,必填
PodCertificateRequest 的名称
namespace (在路径中): string,必填
body: Patch,必需
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
force (在查询中): boolean
pretty (在查询中): string
响应
200 (PodCertificateRequest): OK
201 (PodCertificateRequest): Created
401: 未授权
patch
部分更新指定的 PodCertificateRequest 的状态
HTTP 请求
PATCH /apis/certificates.k8s.io/v1alpha1/namespaces/{namespace}/podcertificaterequests/{name}/status
参数
name (在路径中): string,必填
PodCertificateRequest 的名称
namespace (在路径中): string,必填
body: Patch,必需
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
force (在查询中): boolean
pretty (在查询中): string
响应
200 (PodCertificateRequest): OK
201 (PodCertificateRequest): Created
401: 未授权
delete
删除一个 PodCertificateRequest
HTTP 请求
DELETE /apis/certificates.k8s.io/v1alpha1/namespaces/{namespace}/podcertificaterequests/{name}
参数
name (在路径中): string,必填
PodCertificateRequest 的名称
namespace (在路径中): string,必填
body: DeleteOptions
dryRun (在查询中): string
gracePeriodSeconds (在查询中): integer
ignoreStoreReadErrorWithClusterBreakingPotential (在查询中): boolean
pretty (在查询中): string
propagationPolicy (在查询中): string
响应
200 (Status): OK
202 (Status): 已接受
401: 未授权
deletecollection
删除 PodCertificateRequest 的集合
HTTP 请求
DELETE /apis/certificates.k8s.io/v1alpha1/namespaces/{namespace}/podcertificaterequests
参数
namespace (在路径中): string,必填
body: DeleteOptions
continue (在查询中): string
dryRun (在查询中): string
fieldSelector (在查询中): string
gracePeriodSeconds (在查询中): integer
ignoreStoreReadErrorWithClusterBreakingPotential (在查询中): boolean
labelSelector (在查询中): string
limit (在查询中): integer
pretty (在查询中): string
propagationPolicy (在查询中): string
resourceVersion (在查询中): string
resourceVersionMatch (在查询中): string
sendInitialEvents (在查询中): boolean
timeoutSeconds (在查询中): integer
响应
200 (Status): OK
401: 未授权
本页面是自动生成的。
如果你打算报告此页面存在的问题,请在问题描述中提及此页面是自动生成的。修复可能需要在 Kubernetes 项目的其他地方进行。