Secret
apiVersion: v1
import "k8s.io/api/core/v1"
Secret
Secret 包含特定型別的秘密資料。Data 欄位中所有值的總位元組數必須小於 MaxSecretSize 位元組。
apiVersion: v1
kind: Secret
metadata (ObjectMeta)
標準物件的元資料。更多資訊:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
data (map[string][]byte)
Data 包含秘密資料。每個鍵必須由字母數字字元、'-'、'_' 或 '.' 組成。秘密資料的序列化形式是一個 base64 編碼字串,表示此處的任意(可能非字串)資料值。詳見 https://tools.ietf.org/html/rfc4648#section-4
immutable (boolean)
如果設定為 true,Immutable 會確保儲存在 Secret 中的資料無法更新(只能修改物件元資料)。如果未設定為 true,該欄位可以隨時修改。預設為 nil。
stringData (map[string]string)
stringData 允許以字串形式指定非二進位制秘密資料。它作為只寫輸入欄位提供,以方便使用。所有鍵和值在寫入時會合併到 data 欄位中,覆蓋任何現有值。從 API 讀取時,stringData 欄位永不輸出。
type (string)
用於方便對秘密資料的程式化處理。更多資訊:https://kubernetes.club.tw/docs/concepts/configuration/secret/#secret-types
SecretList
SecretList 是 Secret 的列表。
apiVersion: v1
kind: SecretList
metadata (ListMeta)
標準列表元資料。更多資訊: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
items ([]Secret), 必需
Items 是秘密物件的列表。更多資訊:https://kubernetes.club.tw/docs/concepts/configuration/secret
操作
get
讀取指定的 Secret
HTTP 請求
GET /api/v1/namespaces/{namespace}/secrets/{name}
引數
響應
200 (Secret): 正常
401: 未授權
list
列出或監視 Secret 型別的物件
HTTP 請求
GET /api/v1/namespaces/{namespace}/secrets
引數
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 (SecretList): 正常
401: 未授權
list
列出或監視 Secret 型別的物件
HTTP 請求
GET /api/v1/secrets
引數
allowWatchBookmarks (在查詢中): boolean
continue (在查詢中): string
fieldSelector (在查詢中): string
labelSelector (在查詢中): string
limit (在查詢中): integer
pretty (在查詢中): string
resourceVersion (在查詢中): string
resourceVersionMatch (在查詢中): string
sendInitialEvents (在查詢中): boolean
timeoutSeconds (在查詢中): integer
watch (在查詢中): boolean
響應
200 (SecretList): 正常
401: 未授權
create
建立一個 Secret
HTTP 請求
POST /api/v1/namespaces/{namespace}/secrets
引數
namespace (在路徑中): string,必填
body: Secret, 必需
dryRun (在查詢中): string
fieldManager (在查詢中): string
fieldValidation (在查詢中): string
pretty (在查詢中): string
響應
200 (Secret): 正常
201 (Secret): 已建立
202 (Secret): 已接受
401: 未授權
update
替換指定的 Secret
HTTP 請求
PUT /api/v1/namespaces/{namespace}/secrets/{name}
引數
name (在路徑中): string,必填
Secret 的名稱
namespace (在路徑中): string,必填
body: Secret, 必需
dryRun (在查詢中): string
fieldManager (在查詢中): string
fieldValidation (在查詢中): string
pretty (在查詢中): string
響應
200 (Secret): 正常
201 (Secret): 已建立
401: 未授權
patch
部分更新指定的 Secret
HTTP 請求
PATCH /api/v1/namespaces/{namespace}/secrets/{name}
引數
name (在路徑中): string,必填
Secret 的名稱
namespace (在路徑中): string,必填
body: Patch,必需
dryRun (在查詢中): string
fieldManager (在查詢中): string
fieldValidation (在查詢中): string
force (在查詢中): boolean
pretty (在查詢中): string
響應
200 (Secret): 正常
201 (Secret): 已建立
401: 未授權
delete
刪除一個 Secret
HTTP 請求
DELETE /api/v1/namespaces/{namespace}/secrets/{name}
引數
name (在路徑中): string,必填
Secret 的名稱
namespace (在路徑中): string,必填
body: DeleteOptions
dryRun (在查詢中): string
gracePeriodSeconds (在查詢中): integer
ignoreStoreReadErrorWithClusterBreakingPotential (在查詢中): boolean
pretty (在查詢中): string
propagationPolicy (在查詢中): string
響應
200 (Status): OK
202 (Status): 已接受
401: 未授權
deletecollection
刪除 Secret 集合
HTTP 請求
DELETE /api/v1/namespaces/{namespace}/secrets
引數
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 專案的其他地方進行。