Replacing the Status of a Specified Namespace
Function
This API is used to replace the status information of a specified namespace.
When namespace.deletionTimestamp is set to null, phase can be set to Active only.
When namespace.deletionTimestamp is not set to null, phase can be set to Terminating only.
Request
Request parameters:
For the description about request parameters, see Table 2.
Example request:
{
"apiVersion": "v1",
"kind": "Namespace",
"metadata": {
"name": "test",
"labels": {
"name": "test"
}
},
"spec": {
"finalizers": [
"openshift.com/origin",
"kubernetes"
]
},
"status": {
"phase": "Active"
}
}
Response
Response parameters:
For the description about response parameters, see Request.
Example response:
{
"kind": "Namespace",
"apiVersion": "v1",
"metadata": {
"name": "test",
"selfLink": "/api/v1/namespaces/test/status",
"uid": "00468bb2-fcef-11e7-9193-fa163ecdc4fd",
"resourceVersion": "95099",
"creationTimestamp": "2018-01-19T08:01:49Z",
"labels": {
"name": "test"
},
"annotations": {
"test": "woil"
},
"enable": true
},
"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: Replacing a Specified Namespace
Next Article: Replacing the Finalize Values of a Specified Namespace
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.