Deleting a Specified NetworkPolicy
Function
This API is used to delete a specified NetworkPolicy.
URL
DELETE /apis/networking.k8s.io/v1/namespaces/{namespace}/networkpolicies/{name}
Table 1 describes the parameters of the API.
|
Parameter |
Mandatory |
Description |
|---|---|---|
|
name |
Yes |
Name of the NetworkPolicy. |
|
namespace |
Yes |
Object name and auth scope, such as for teams and projects. |
|
pretty |
No |
If 'true', then the output is pretty printed. |
|
body |
Yes |
- |
Request
N/A
Example response:
{
"apiVersion": "v1",
"code": 200,
"details": {
"name": "aqws",
"group": "networking.k8s.io",
"kind": "networkpolicies",
"uid" : "0eea113a-ebb6-11e8-889b-fa163ecbd381"
},
"kind": "Status",
"metadata" : {},
"status": "Success"
}
Status Code
Table 2 describes the status code of this API.
Last Article: Replacing a Specified NetworkPolicy
Next Article: Deleting NetworkPolicies in Batches
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.