Skip to content

Commit 33b0a41

Browse files
authored
Merge pull request #70210 from EricPonvelle/OSDOCS-8767_Configuring-EgressIP
OSDOCS-8767: Adding information about configuring consistent IP
2 parents e86d4bb + 0ad587b commit 33b0a41

File tree

6 files changed

+67
-13
lines changed

6 files changed

+67
-13
lines changed

_topic_maps/_topic_map.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1399,7 +1399,6 @@ Topics:
13991399
File: uninstalling-sriov-operator
14001400
- Name: OVN-Kubernetes network plugin
14011401
Dir: ovn_kubernetes_network_provider
1402-
Distros: openshift-origin,openshift-enterprise
14031402
Topics:
14041403
- Name: About the OVN-Kubernetes network plugin
14051404
File: about-ovn-kubernetes

_topic_maps/_topic_map_rosa.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -993,6 +993,11 @@ Topics:
993993
File: deleting-network-policy
994994
- Name: Configuring multitenant isolation with network policy
995995
File: multitenant-network-policy
996+
- Name: OVN-Kubernetes network plugin
997+
Dir: ovn_kubernetes_network_provider
998+
Topics:
999+
- Name: Configuring an egress IP address
1000+
File: configuring-egress-ips-ovn
9961001
- Name: Configuring Routes
9971002
Dir: routes
9981003
Topics:

cloud_experts_tutorials/cloud-experts-consistent-egress-ip.adoc

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,6 @@ The above example uses `jq` as a friendly filter. If you do not have `jq` instal
7878

7979
== Create the egress IP rule(s)
8080

81-
[NOTE]
82-
====
83-
Generally speaking, it would be ideal to label the nodes prior to assigning the egress IP addresses, however there is a bug that exists which needs to be fixed first. Once this is fixed, the process and documentation will be re-ordered to address this. See link:https://issues.redhat.com/browse/OCPBUGS-4969[OCPBUGS-4969].
84-
====
85-
8681
=== Identify the egress IPs
8782

8883
Before creating the rules, we should identify which egress IPs that we will use. It should be noted that the egress IPs that you select should exist as a part of the subnets in which the worker nodes are provisioned into.
@@ -97,7 +92,7 @@ Create a project to demonstrate assigning egress IP addresses based on a namespa
9792

9893
[source,terminal]
9994
----
100-
$ oc new-project demo-egress-ns
95+
$ oc create -f demo-egress-pod.yaml
10196
----
10297

10398
Create the egress rule. This rule will ensure that egress traffic will be applied to all pods within the namespace that we just created using the `spec.namespaceSelector` field:

modules/nw-egress-ips-about.adoc

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,26 @@ To ensure that you can reliably allow access to the server from only that specif
2121

2222
An egress IP address assigned to a namespace is different from an egress router, which is used to send traffic to specific destinations.
2323

24-
In some cluster configurations, application pods and ingress router pods run on the same node. If you configure an egress IP address for an application project in this scenario, the IP address is not used when you send a request to a route from the application project.
24+
ifndef::openshift-rosa[]
25+
In some cluster configurations,
26+
endif::openshift-rosa[]
27+
ifdef::openshift-rosa[]
28+
In {hcp-title} clusters,
29+
endif::openshift-rosa[]
30+
application pods and ingress router pods run on the same node. If you configure an egress IP address for an application project in this scenario, the IP address is not used when you send a request to a route from the application project.
2531

2632
ifdef::openshift-sdn[]
2733
An egress IP address is implemented as an additional IP address on the primary network interface of a node and must be in the same subnet as the primary IP address of the node. The additional IP address must not be assigned to any other node in the cluster.
2834
endif::openshift-sdn[]
2935

36+
ifndef::openshift-rosa[]
3037
[IMPORTANT]
3138
====
3239
Egress IP addresses must not be configured in any Linux network configuration files, such as `ifcfg-eth0`.
3340
====
41+
endif::openshift-rosa[]
3442

43+
ifndef::openshift-rosa[]
3544
[id="nw-egress-ips-platform-support_{context}"]
3645
== Platform support
3746

@@ -54,12 +63,20 @@ Support for the egress IP address functionality on various platforms is summariz
5463
| Nutanix | Yes
5564

5665
|===
66+
endif::openshift-rosa[]
5767

5868
[IMPORTANT]
5969
====
60-
The assignment of egress IP addresses to control plane nodes with the EgressIP feature is not supported on a cluster provisioned on Amazon Web Services (AWS). (link:https://bugzilla.redhat.com/show_bug.cgi?id=2039656[*BZ#2039656*])
70+
The assignment of egress IP addresses to control plane nodes with the EgressIP feature is
71+
ifdef::openshift-rosa[]
72+
not supported.
73+
endif::openshift-rosa[]
74+
ifndef::openshift-rosa[]
75+
not supported on a cluster provisioned on Amazon Web Services (AWS). (link:https://bugzilla.redhat.com/show_bug.cgi?id=2039656[*BZ#2039656*]).
76+
endif::openshift-rosa[]
6177
====
6278

79+
ifndef::openshift-rosa[]
6380
[id="nw-egress-ips-public-cloud-platform-considerations_{context}"]
6481
== Public cloud platform considerations
6582

@@ -93,6 +110,7 @@ endif::openshift-sdn[]
93110
====
94111
When an {rh-openstack} cluster administrator assigns a floating IP to the reservation port, {product-title} cannot delete the reservation port. The `CloudPrivateIPConfig` object cannot perform delete and move operations until an {rh-openstack} cluster administrator unassigns the floating IP from the reservation port.
95112
====
113+
endif::openshift-rosa[]
96114

97115
The following examples illustrate the annotation from nodes on several public cloud providers. The annotations are indented for readability.
98116

@@ -108,6 +126,7 @@ cloud.network.openshift.io/egress-ipconfig: [
108126
]
109127
----
110128

129+
ifndef::openshift-rosa[]
111130
.Example `cloud.network.openshift.io/egress-ipconfig` annotation on GCP
112131
[source,yaml]
113132
----
@@ -119,6 +138,7 @@ cloud.network.openshift.io/egress-ipconfig: [
119138
}
120139
]
121140
----
141+
endif::openshift-rosa[]
122142

123143
The following sections describe the IP address capacity for supported public cloud environments for use in your capacity calculation.
124144

@@ -127,6 +147,7 @@ The following sections describe the IP address capacity for supported public clo
127147

128148
On AWS, constraints on IP address assignments depend on the instance type configured. For more information, see link:https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html#AvailableIpPerENI[IP addresses per network interface per instance type]
129149

150+
ifndef::openshift-rosa[]
130151
[id="nw-egress-ips-capacity-gcp_{context}"]
131152
=== Google Cloud Platform (GCP) IP address capacity limits
132153

@@ -148,11 +169,12 @@ On Azure, the following capacity limits exist for IP address assignment:
148169
- Per virtual network, the maximum number of assigned IP addresses cannot exceed 65,536.
149170

150171
For more information, see link:https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/azure-subscription-service-limits?toc=/azure/virtual-network/toc.json#networking-limits[Networking limits].
172+
endif::openshift-rosa[]
151173

152174
[id="nw-egress-ips-multi-nic-considerations_{context}"]
153175
== Considerations for using an egress IP on additional network interfaces
154176

155-
In {product-title}, egress IPs provide administrators a way to control network traffic. Egress IPs can be used with the `br-ex`, or primary, network interface, which is a Linux bridge interface associated with Open vSwitch, or they can be used with additional network interfaces.
177+
In {product-title}, egress IPs provide administrators a way to control network traffic. Egress IPs can be used with the `br-ex`, or primary, network interface, which is a Linux bridge interface associated with Open vSwitch, or they can be used with additional network interfaces.
156178

157179
You can inspect your network interface type by running the following command:
158180

@@ -165,15 +187,16 @@ The primary network interface is assigned a node IP address which also contains
165187

166188
If the egress IP is not within the subnet of the primary network interface subnet, you can use an egress IP on another Linux network interface that is not of the primary network interface type. By doing so, {product-title} administrators are provided with a greater level of control over networking aspects such as routing, addressing, segmentation, and security policies. This feature provides users with the option to route workload traffic over specific network interfaces for purposes such as traffic segmentation or meeting specialized requirements.
167189

168-
If the egress IP is not within the subnet of the primary network interface, then the selection of another network interface for egress traffic might occur if they are present on a node.
190+
If the egress IP is not within the subnet of the primary network interface, then the selection of another network interface for egress traffic might occur if they are present on a node.
169191

170-
You can determine which other network interfaces might support egress IPs by inspecting the `k8s.ovn.org/host-cidrs` Kubernetes node annotation. This annotation contains the addresses and subnet mask found for the primary network interface. It also contains additional network interface addresses and subnet mask information. These addresses and subnet masks are assigned to network interfaces that use the link:https://networklessons.com/cisco/ccna-200-301/longest-prefix-match-routing[longest prefix match routing] mechanism to determine which network interface supports the egress IP.
192+
You can determine which other network interfaces might support egress IPs by inspecting the `k8s.ovn.org/host-cidrs` Kubernetes node annotation. This annotation contains the addresses and subnet mask found for the primary network interface. It also contains additional network interface addresses and subnet mask information. These addresses and subnet masks are assigned to network interfaces that use the link:https://networklessons.com/cisco/ccna-200-301/longest-prefix-match-routing[longest prefix match routing] mechanism to determine which network interface supports the egress IP.
171193

172194
[NOTE]
173195
====
174196
OVN-Kubernetes provides a mechanism to control and direct outbound network traffic from specific namespaces and pods. This ensures that it exits the cluster through a particular network interface and with a specific egress IP address.
175197
====
176198

199+
ifndef::openshift-rosa[]
177200
[discrete]
178201
[id="nw-egress-ips-multi-nic-requirements_{context}"]
179202
=== Requirements for assigning an egress IP to a network interface that is not the primary network interface
@@ -203,7 +226,7 @@ spec:
203226
ipForwarding: Global
204227
# ...
205228
----
206-
229+
endif::openshift-rosa[]
207230
ifdef::openshift-sdn[]
208231
[id="nw-egress-ips-limitations_{context}"]
209232
== Limitations

modules/nw-egress-ips-node.adoc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,19 @@ You can apply the `k8s.ovn.org/egress-assignable=""` label to a node in your clu
1010

1111
.Prerequisites
1212

13+
ifndef::openshift-rosa[]
1314
* Install the OpenShift CLI (`oc`).
15+
endif::openshift-rosa[]
16+
ifdef::openshift-rosa[]
17+
* Install the ROSA CLI (`rosa`).
18+
endif::openshift-rosa[]
1419
* Log in to the cluster as a cluster administrator.
1520

1621
.Procedure
1722

1823
* To label a node so that it can host one or more egress IP addresses, enter the following command:
1924
+
25+
ifndef::openshift-rosa[]
2026
[source,terminal]
2127
----
2228
$ oc label nodes <node_name> k8s.ovn.org/egress-assignable="" <1>
@@ -38,3 +44,15 @@ metadata:
3844
name: <node_name>
3945
----
4046
====
47+
endif::openshift-rosa[]
48+
ifdef::openshift-rosa[]
49+
[source,terminal]
50+
----
51+
$ rosa edit machinepool <machinepool_name> --cluster=<cluster_name> --labels "k8s.ovn.org/egress-assignable="
52+
----
53+
+
54+
[IMPORTANT]
55+
====
56+
This command replaces any exciting node labels on your machinepool. You should include any of the desired labels to the `--labels` field to ensure that your existing node labels persist.
57+
====
58+
endif::openshift-rosa[]

networking/ovn_kubernetes_network_provider/configuring-egress-ips-ovn.adoc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
[id="configuring-egress-ips-ovn"]
33
= Configuring an egress IP address
44
include::_attributes/common-attributes.adoc[]
5+
include::_attributes/attributes-openshift-dedicated.adoc[]
56
:context: configuring-egress-ips-ovn
67

78
toc::[]
@@ -12,18 +13,31 @@ include::modules/nw-egress-ips-about.adoc[leveloffset=+1]
1213

1314
include::modules/nw-egress-ips-object.adoc[leveloffset=+1]
1415

16+
ifndef::openshift-rosa[]
1517
include::modules/nw-egress-ips-config-object.adoc[leveloffset=+1]
18+
endif::openshift-rosa[]
1619

1720
include::modules/nw-egress-ips-node.adoc[leveloffset=+1]
1821

1922
[id="configuring-egress-ips-next-steps"]
2023
== Next steps
2124

25+
ifndef::openshift-dedicated,openshift-rosa[]
2226
* xref:../../networking/ovn_kubernetes_network_provider/assigning-egress-ips-ovn.adoc#assigning-egress-ips-ovn[Assigning egress IPs]
27+
endif::openshift-dedicated,openshift-rosa[]
28+
ifdef::openshift-dedicated,openshift-rosa[]
29+
* link:https://docs.openshift.com/container-platform/4.14/networking/ovn_kubernetes_network_provider/assigning-egress-ips-ovn.html#assigning-egress-ips-ovn[Assigning egress IPs]
30+
endif::openshift-dedicated,openshift-rosa[]
2331

2432
[role="_additional-resources"]
2533
[id="configuring-egress-ips-additional-resources"]
2634
== Additional resources
2735

36+
ifndef::openshift-dedicated,openshift-rosa[]
2837
* xref:../../rest_api/objects/index.adoc#labelselector-meta-v1[LabelSelector meta/v1]
2938
* xref:../../rest_api/objects/index.adoc#labelselectorrequirement-meta-v1[LabelSelectorRequirement meta/v1]
39+
endif::openshift-dedicated,openshift-rosa[]
40+
ifdef::openshift-dedicated,openshift-rosa[]
41+
* link:https://docs.openshift.com/container-platform/4.14/rest_api/objects/index.html#labelselector-meta-v1[LabelSelector meta/v1]
42+
* link:https://docs.openshift.com/container-platform/4.14/rest_api/objects/index.html#labelselectorrequirement-meta-v1[LabelSelectorRequirement meta/v1]
43+
endif::openshift-dedicated,openshift-rosa[]

0 commit comments

Comments
 (0)