Editing an egress firewall for a project

As a cluster administrator, you can modify network traffic rules for an existing egress firewall.

Viewing an EgressNetworkPolicy object

You can view an EgressNetworkPolicy object in your cluster.

Prerequisites

  • A cluster using the OpenShift SDN network plugin.

  • Install the OpenShift Command-line Interface (CLI), commonly known as oc.

  • You must log in to the cluster.

Procedure

  1. Optional: To view the names of the EgressNetworkPolicy objects defined in your cluster, enter the following command:

    1. $ oc get egressnetworkpolicy --all-namespaces
  2. To inspect a policy, enter the following command. Replace <policy_name> with the name of the policy to inspect.

    1. $ oc describe egressnetworkpolicy <policy_name>

    Example output

    1. Name: default
    2. Namespace: project1
    3. Created: 20 minutes ago
    4. Labels: <none>
    5. Annotations: <none>
    6. Rule: Allow to 1.2.3.0/24
    7. Rule: Allow to www.example.com
    8. Rule: Deny to 0.0.0.0/0