This section describes how to view network policy details.

Prerequisites

  • You need to join a cluster and have the Cluster Network Resource View 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.

Steps

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

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

  3. In the network policy list, click the name of a network policy to open its details page.

  4. On the network policy details page, view the resource attributes of the network policy in the Attributes area.

    Parameter Description

    Cluster

    The cluster to which the network policy belongs.

    Project

    The project to which the network policy belongs.

    Creation Time

    The creation time of the network policy.

    Creator

    The user who created the network policy.

  5. On the network policy details page, click the Egress Rules tab to view the egress rules of the network policy.

    Egress rules are used to restrict pods to only access specific other pods or network segments.

    Parameter Description

    Target

    Information about the pods to which the rule applies.

    • Project: The project to which the rule belongs. Rules in a network policy only apply to pods in the project to which the network policy belongs.

    • Label: The label that the pods to which the rule applies must have. If no label is set, the rule applies to all pods in the project to which the network policy belongs.

    Destination

    Information about other pods or network segments that the target pods can access.

    • Project: The project to which the other pods that the target pods can access belong.

    • Label: The label that the other pods that the target pods can access must have. If no label is set, the target pods can access all pods in the project.

    • CIDR: The network segment that the target pods can access.

    • Port: The port of the other pods or network segments that the target pods can access. If no port is set, the target pods can access all ports of the other pods or network segments.

  6. On the network policy details page, click the Ingress Rules tab to view the ingress rules of the network policy.

    Ingress rules are used to restrict pods to only be accessed by specific other pods or network segments.

    Parameter Description

    Target

    Information about the pods to which the rule applies.

    • Project: The project to which the rule belongs. Rules in a network policy only apply to pods within the project to which the network policy belongs.

    • Label: The label that the pods to which the rule applies must have. If no label is set, the rule applies to all pods in the project to which the network policy belongs.

    Destination

    Information about other pods or network segments that can access the target pods.

    • Project: The project to which the other pods that can access the target pods belong.

    • Label: The label that the other pods that can access the target pods must have. If no label is set, all pods in the project can access the target pods.

    • CIDR: The network segment that can access the target pods.

    • Port: The port of the target pods that other pods or network segments can access. If no port is set, other pods or network segments can access all ports of the target pods.