As a cluster administrator, you can delete a network policy from a namespace.

Deleting a NetworkPolicy object

You can delete a NetworkPolicy object.

  • You installed the OpenShift CLI (oc).

  • You are logged in to the cluster with a user with cluster-admin privileges.

  • To delete a NetworkPolicy object, enter the following command. Replace <policy-name> with the name of the object.

    $ oc delete networkpolicy <policy-name>