Creating an EgressFirewall custom resource (CR)
As a cluster administrator, you can create an egress firewall policy object for a project.
|
|
If the project already has an |
-
A cluster that uses the OVN-Kubernetes network plugin.
-
Install the OpenShift CLI (
oc). -
You must log in to the cluster as a cluster administrator.
-
Create a policy rule:
-
Create a
<policy_name>.yamlfile where<policy_name>describes the egress policy rules. -
Define the
EgressFirewallobject in the file.
-
-
Create the policy object by entering the following command. Replace
<policy_name>with the name of the policy and<project>with the project that the rule applies to.$ oc create -f <policy_name>.yaml -n <project>Successful output lists the
egressfirewall.k8s.ovn.org/v1name and thecreatedstatus. -
Optional: Save the
<policy_name>.yamlfile so that you can make changes later.