Viewing a network policy

    You can examine the network policies in a namespace.

    Prerequisites

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

    Procedure

    Example NetworkPolicy object

    1The name of the NetworkPolicy object.
    2A selector describing the pods the policy applies to. The policy object can only select pods in the project that the NetworkPolicy object is defined.
    3A selector matching the pods that the policy object allows ingress traffic from. The selector will match pods in any project.
    4A list of one or more destination ports to accept traffic on.