Creating a ConfigMap
Function
This API is used to create a configMap.
URI
POST /api/v1/namespaces/{namespace}/configmaps
|
Parameter |
Description |
|---|---|
|
namespace |
Object name and auth scope, such as for teams and projects. |
|
Parameter |
Mandatory |
Description |
|---|---|---|
|
pretty |
No |
If 'true', then the output is pretty printed. |
Request
Request parameters
For the description about request parameters, see Table 121.
Example request
{
"apiVersion": "v1",
"data": {
"property_1": "test"
},
"kind": "ConfigMap",
"metadata": {
"name": "configmap-test"
}
}
Response
Response parameters
For the description about response parameters, see Table 121.
Example response
{
"kind": "ConfigMap",
"apiVersion": "v1",
"metadata": {
"name": "configmap-test",
"namespace": "namespace-test",
"selfLink": "/api/v1/namespaces/namespace-test/configmaps/configmap-test",
"uid": "379519a3-aff0-11e8-8f17-c81fbe371a17",
"resourceVersion": "5170290",
"creationTimestamp": "2018-09-04T03:11:29Z",
"enable": true
},
"data": {
"property_1": "test"
}
}
Status Codes
Table 3 describes the status codes of this API.
For more status codes, see Status Codes.
Last Article: ConfigMap
Next Article: Reading a ConfigMap
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.