ConfigMap
apiVersion: v1
import "k8s.io/api/core/v1"
ConfigMap
ConfigMap 儲存供 Pod 消費的配置資料。
apiVersion: v1
kind: ConfigMap
metadata (ObjectMeta)
標準物件的元資料。更多資訊:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
binaryData (map[string][]byte)
BinaryData 包含二進位制資料。每個鍵必須由字母數字字元、'-'、'_' 或 '.' 組成。BinaryData 可以包含不在 UTF-8 範圍內的位元組序列。儲存在 BinaryData 中的鍵不能與 Data 欄位中的鍵重疊,這在驗證過程中強制執行。使用此欄位需要 1.10+ apiserver 和 kubelet。
data (map[string]string)
Data 包含配置資料。每個鍵必須由字母數字字元、'-'、'_' 或 '.' 組成。具有非 UTF-8 位元組序列的值必須使用 BinaryData 欄位。儲存在 Data 中的鍵不能與 BinaryData 欄位中的鍵重疊,這在驗證過程中強制執行。
immutable (布林值)
如果設定為 true,Immutable 可確保儲存在 ConfigMap 中的資料無法更新(只能修改物件元資料)。如果未設定為 true,則該欄位可以隨時修改。預設為 nil。
ConfigMapList
ConfigMapList 是包含 ConfigMap 物件列表的資源。
apiVersion: v1
kind: ConfigMapList
metadata (ListMeta)
更多資訊:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
items ([]ConfigMap),必需
Items 是 ConfigMap 的列表。
操作
get
讀取指定的 ConfigMap
HTTP 請求
GET /api/v1/namespaces/{namespace}/configmaps/{name}
引數
響應
200 (ConfigMap):正常
401: 未授權
list
列出或監視 ConfigMap 型別的物件
HTTP 請求
GET /api/v1/namespaces/{namespace}/configmaps
引數
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 (ConfigMapList):正常
401: 未授權
list
列出或監視 ConfigMap 型別的物件
HTTP 請求
GET /api/v1/configmaps
引數
allowWatchBookmarks (在查詢中): boolean
continue (在查詢中): string
fieldSelector (在查詢中): string
labelSelector (在查詢中): string
limit (在查詢中): integer
pretty (在查詢中): string
resourceVersion (在查詢中): string
resourceVersionMatch (在查詢中): string
sendInitialEvents (在查詢中): boolean
timeoutSeconds (在查詢中): integer
watch (在查詢中): boolean
響應
200 (ConfigMapList):正常
401: 未授權
create
建立一個 ConfigMap
HTTP 請求
POST /api/v1/namespaces/{namespace}/configmaps
引數
namespace (在路徑中): string,必填
body: ConfigMap,必需
dryRun (在查詢中): string
fieldManager (在查詢中): string
fieldValidation (在查詢中): string
pretty (在查詢中): string
響應
200 (ConfigMap):正常
201 (ConfigMap):已建立
202 (ConfigMap):已接受
401: 未授權
update
替換指定的 ConfigMap
HTTP 請求
PUT /api/v1/namespaces/{namespace}/configmaps/{name}
引數
name (在路徑中): string,必填
ConfigMap 的名稱
namespace (在路徑中): string,必填
body: ConfigMap,必需
dryRun (在查詢中): string
fieldManager (在查詢中): string
fieldValidation (在查詢中): string
pretty (在查詢中): string
響應
200 (ConfigMap):正常
201 (ConfigMap):已建立
401: 未授權
patch
部分更新指定的 ConfigMap
HTTP 請求
PATCH /api/v1/namespaces/{namespace}/configmaps/{name}
引數
name (在路徑中): string,必填
ConfigMap 的名稱
namespace (在路徑中): string,必填
body: Patch,必需
dryRun (在查詢中): string
fieldManager (在查詢中): string
fieldValidation (在查詢中): string
force (在查詢中): boolean
pretty (在查詢中): string
響應
200 (ConfigMap):正常
201 (ConfigMap):已建立
401: 未授權
delete
刪除一個 ConfigMap
HTTP 請求
DELETE /api/v1/namespaces/{namespace}/configmaps/{name}
引數
name (在路徑中): string,必填
ConfigMap 的名稱
namespace (在路徑中): string,必填
body: DeleteOptions
dryRun (在查詢中): string
gracePeriodSeconds (在查詢中): integer
ignoreStoreReadErrorWithClusterBreakingPotential (在查詢中): boolean
pretty (在查詢中): string
propagationPolicy (在查詢中): string
響應
200 (Status): OK
202 (Status): 已接受
401: 未授權
deletecollection
刪除 ConfigMap 集合
HTTP 請求
DELETE /api/v1/namespaces/{namespace}/configmaps
引數
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 專案的其他地方進行。