This is a cache of https://docs.openshift.com/container-platform/4.15/networking/openshift_sdn/editing-egress-firewall.html. It is a snapshot of the page at 2024-11-22T12:05:31.483+0000.
Editing an <strong>egress</strong> firewall for a project - OpenShift SDN network plugin | Networking | OpenShift Container Platform 4.15
×

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

OpenShift SDN CNI is deprecated as of OpenShift Container Platform 4.14. As of OpenShift Container Platform 4.15, the network plugin is not an option for new installations. In a subsequent future release, the OpenShift SDN network plugin is planned to be removed and no longer supported. Red Hat will provide bug fixes and support for this feature until it is removed, but this feature will no longer receive enhancements. As an alternative to OpenShift SDN CNI, you can use OVN Kubernetes CNI instead.

Editing an egressNetworkPolicy object

As a cluster administrator, you can update the egress firewall for a project.

Prerequisites
  • A cluster using the OpenShift SDN network plugin.

  • Install the OpenShift CLI (oc).

  • You must log in to the cluster as a cluster administrator.

Procedure
  1. Find the name of the egressNetworkPolicy object for the project. Replace <project> with the name of the project.

    $ oc get -n <project> egressnetworkpolicy
  2. Optional: If you did not save a copy of the egressNetworkPolicy object when you created the egress network firewall, enter the following command to create a copy.

    $ oc get -n <project> egressnetworkpolicy <name> -o yaml > <filename>.yaml

    Replace <project> with the name of the project. Replace <name> with the name of the object. Replace <filename> with the name of the file to save the YAML to.

  3. After making changes to the policy rules, enter the following command to replace the egressNetworkPolicy object. Replace <filename> with the name of the file containing the updated egressNetworkPolicy object.

    $ oc replace -f <filename>.yaml