This section describes how to delete a network policy.

Note

A deleted network policy cannot be recovered. Please perform this operation with caution.

Prerequisites

  • You need to join a cluster and have the Cluster Network Resource Management permission in the cluster. For more information, see Cluster Members and Cluster Roles.

  • The KubeSphere Network extension must be installed and enabled on the KubeSphere platform.

Delete a Single Network Policy

  1. Log in to the KubeSphere web console with a user who has Cluster Network Resource Management permissions and enter your cluster.

  2. Click Network > Network Policy in the left navigation pane.

  3. On the right side of the network policy you want to delete, click more, and then select Delete from the dropdown list.

  4. In the Delete Network Policy dialog box, enter the name of the network policy, and then click OK.

Batch Delete Network Policies

  1. Log in to the KubeSphere web console with a user who has Cluster Network Resource Management permissions and enter your cluster.

  2. Click Network > Network Policy in the left navigation pane.

  3. Select the checkboxes to the left of the network policies you want to delete, and then click Delete above the network policy list.

  4. In the Batch Delete Network Policies dialog box, enter the names of the network policies, and then click OK.

    Note

    Use commas (,) and spaces to separate multiple names.