Updating a Specified Namespace
Function
This API is used to update information about a specified namespace.
The following fields can be updated:
- metadata.selfLink
- metadata.resourceVersion
- metadata.labels
- metadata.generateName
- metadata.annotations
Request
Request parameters:
For the description about the Content-Type field, see Patch Request Method Operation Description.
Example request:
Content-Type: application/json-patch+json
[
{
"op": "add",
"path": "/spec/finalizers/0",
"value": "kubernetes"
}
]
Response
Response parameters:
For the description about response parameters, see Request.
Example response:
{
"kind": "Namespace",
"apiVersion": "v1",
"metadata": {
"name": "helloworld",
"selfLink": "/api/v1/namespaces/helloworld",
"uid": "1298d13a-5d34-11e6-aeb9-286ed488fafe",
"resourceVersion": "3043",
"creationTimestamp": "2016-08-08T06:48:11Z"
},
"spec": {
"finalizers": [
"kubernetes"
]
},
"status": {
"phase": "Active"
}
}
Status Code
Table 2 describes the status code of this API.
|
Status Code |
Description |
|---|---|
|
200 |
This operation succeeds, and a Namespace resource object is returned. |
For the description about error status codes, see Status Code.
Last Article: Listing Namespaces
Next Article: Resource Quotas
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.