mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
45 lines
1.4 KiB
Plaintext
45 lines
1.4 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * networking/openshift_sdn/editing-egress-firewall.adoc
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="nw-egressnetworkpolicy-edit_{context}"]
|
|
= Editing an EgressNetworkPolicy custom resource (CR)
|
|
|
|
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
|
|
|
|
. Find the name of the `EgressNetworkPolicy` CR for the project.
|
|
+
|
|
[source,terminal,subs="attributes+"]
|
|
----
|
|
$ oc get -n <project> egressnetworkpolicy
|
|
----
|
|
+
|
|
Replace `<project>` with the name of the project.
|
|
|
|
. Optional: If you did not save a copy of the `EgressNetworkPolicy` CR when you created the egress firewall, enter the following command to create a copy.
|
|
+
|
|
[source,terminal,subs="attributes+"]
|
|
----
|
|
$ 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.
|
|
|
|
. After making changes to the policy rules, enter the following command to replace the `EgressNetworkPolicy` CR.
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc replace -f <filename>.yaml
|
|
----
|
|
+
|
|
Replace `<filename>` with the name of the file containing the updated `EgressNetworkPolicy` CR.
|