Deploying an egress router pod in redirect mode
Define the configuration for an egress router pod in the object. The following YAML describes the fields for the configuration of an egress router pod in redirect mode:
Example egress router pod specification
When an egress router pod is deployed in redirect mode, you can specify redirection rules by using one or more of the following formats:
<port> <protocol> <ip_address> <remote_port>
- As above, except that the connection is redirected to a different<remote_port>
on<ip_address>
.
In the example that follows several rules are defined:
The first line redirects traffic from local port
80
to port on203.0.113.25
.The second and third lines redirect local ports
8080
and8443
to remote ports80
and443
on203.0.113.26
.
Example configuration
Prerequisites
Install the OpenShift CLI (
oc
).Log in as a user with privileges.
Procedure
Create an egress router pod.
-
Your pods can now connect to this service. Their connections are redirected to the corresponding ports on the external server, using the reserved egress IP address.