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 專案的其他地方進行。