列出所有的ConfigMap
功能介绍
This API is used to obtain a ConfigMap list.
URI
GET /api/v1/configmaps
表1描述该API的参数。
参数 |
是否必选 |
描述 |
---|---|---|
pretty |
No |
If 'true', then the output is pretty printed. |
labelSelector |
No |
A selector to restrict the list of returned objects by their labels. Defaults to everything. |
includeUninitialized |
No |
If true, partially initialized resources are included in the response. |
fieldSelector |
No |
A selector to restrict the list of returned objects by their fields. Defaults to everything. |
watch |
No |
Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. |
resourceVersion |
No |
When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. |
timeoutSeconds |
No |
Timeout for the list/watch call. |
请求消息
N/A
响应消息
响应参数:
响应参数的详细描述请参见表4。
响应示例:
{ "kind": "ConfigMapList", "apiVersion": "v1", "metadata": { "selfLink": "/api/v1/configmaps", "resourceVersion": "419140" }, "items": [ { "metadata": { "name": "cluster-versions", "namespace": "kube-system", "selfLink": "/api/v1/namespaces/kube-system/configmaps/cluster-versions", "uid": "89dff34e-dc8e-11e7-9c19-fa163e2d897b", "resourceVersion": "19743", "creationTimestamp": "2017-12-09T03:10:41Z", "enable": true }, "data": { "192.168.0.197": "v1.7.3-r13", "192.168.0.200": "v1.7.3-r13", "master": "v1.7.3-r13" } }, { "metadata": { "name": "extension-apiserver-authentication", "namespace": "kube-system", "selfLink": "/api/v1/namespaces/kube-system/configmaps/extension-apiserver-authentication", "uid": "842ce75c-dc8e-11e7-9c19-fa163e2d897b", "resourceVersion": "69", "creationTimestamp": "2017-12-09T03:10:31Z", "enable": true }, "data": { "client-ca-file": "" } }, { "metadata": { "name": "kube-dns", "namespace": "kube-system", "selfLink": "/api/v1/namespaces/kube-system/configmaps/kube-dns", "uid": "86f45cfb-dc8e-11e7-9c19-fa163e2d897b", "resourceVersion": "80", "creationTimestamp": "2017-12-09T03:10:36Z", "labels": { "addonmanager.kubernetes.io/mode": "EnsureExists" }, "enable": true } }, { "metadata": { "name": "cm-12130306", "namespace": "ns-12130306-s", "selfLink": "/api/v1/namespaces/ns-12130306-s/configmaps/cm-12130306", "uid": "efd6d9e0-dfb3-11e7-9c19-fa163e2d897b", "resourceVersion": "419081", "creationTimestamp": "2017-12-13T03:15:57Z", "enable": true }, "data": { "property_1": "cm-test" } } ] }
