Configuring dual-stack networking for an EgressIP object
For a cluster configured for dual-stack networking, you can apply dual-stack networking to a single EgressIP object. The EgressIP object can then extend dual-stack networking capabilities to a pod.
|
|
Red Hat does not support creating two |
-
You created two egress nodes so that an
EgressIPobject can allocate IPv4 addresses to one node and IPv6 addresses to the other node. For more information, see "Assignment of egress IP addresses to nodes".
-
Create an
EgressIPobject and configure IPv4 and IPv6 addresses for the object. The following exampleEgressIPobject uses selectors to identify which pods use the specified egress IP addresses for their outbound traffic:kind: EgressIP metadata: name: egressip-dual spec: egressIPs: - 192.168.118.30 - 2600:52:7:94::30 namespaceSelector: matchLabels: env: qa podSelector: matchLabels: egressip: ds # ...
-
Create a
Podmanifest file to test and validate yourEgressIPobject. The pod serves as a client workload that sends outbound traffic to verify that yourEgressIPpolicy works as expected.apiVersion: v1 kind: Pod metadata: name: ubi-egressip-pod namespace: test labels: egressip: ds spec: containers: - name: fedora-curl image: registry.redhat.io/ubi9/ubi command: ["/bin/bash", "-c", "sleep infinity"] # ...where:
<labels>-
Sets custom identifiers so that the
EgressIPobject can use these labels to apply egress IP address to target pods.
-
Run a
curlrequest from inside a pod to an external server. This action verifies that outbound traffic correctly uses an address that you specified in theEgressIPobject.$ curl <ipv_address>where:
<ipv_address>-
Depending on the
EgressIPobject, enter an IPv4 or IPv6 address.