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 (boolean)
Immutable,如果设置为 true,则确保 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): OK
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): OK
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): OK
401: 未授权
create
创建一个 ConfigMap
HTTP 请求
POST /api/v1/namespaces/{namespace}/configmaps
参数
namespace (在路径中): string, 必需
body: ConfigMap, 必需
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
pretty (在查询中): string
响应
200 (ConfigMap): OK
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): OK
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): OK
201 (ConfigMap): 已创建
401: 未授权
delete
删除一个 ConfigMap
HTTP 请求
DELETE /api/v1/namespaces/{namespace}/configmaps/{name}
参数
name (在路径中): string, 必需
ConfigMap 的名称
namespace (在路径中): string, 必需
body: DeleteOptions
dryRun (在查询中): string
gracePeriodSeconds (在查询中): integer
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
labelSelector (在查询中): string
limit (在查询中): integer
pretty (在查询中): string
propagationPolicy (在查询中): string
resourceVersion (在查询中): string
resourceVersionMatch (在查询中): string
sendInitialEvents (在查询中): boolean
timeoutSeconds (在查询中): integer
响应
200 (Status): OK
401: 未授权
此页面是自动生成的。
如果您计划报告此页面的问题,请在您的问题描述中提及该页面是自动生成的。修复可能需要在 Kubernetes 项目的其他地方进行。