Configure router IP addresses
To limit ingress to selected host IP addresses or network interfaces in MicroShift, you can set the ingress.listenAddress list in your config.yaml file.
You can restrict the network traffic to the router by configuring specific IP addresses. For example:
-
Use cases where the router is reachable only on internal networks, but not on northbound public networks
-
Use cases where the router is reachable only by northbound public networks, but not on internal networks
-
Use cases where the router is reachable by both internal networks and northbound public networks, but on separate IP addresses
-
You installed MicroShift.
-
You created a MicroShift
config.yamlfile. -
The OpenShift CLI (
oc) is installed.
|
|
If you complete all the configurations that you need to make in the MicroShift |
-
Update the list in the
ingress.listenAddressfield in the MicroShiftconfig.yamlaccording to your requirements and as shown in the following examples:Default router IP address list# ... ingress: listenAddress: - "<host_network>" # ...where:
ingress.listenAddress-
Specifies the IP addresses or network interfaces to limit ingress to. The default value is the entire network of the host. To continue to use the default list, remove the
listen.Addressfield from the MicroShiftconfig.yamlfile. To customize this parameter, use a list. The list can contain either a single IP address or NIC name or multiple IP addresses and NIC names.
You must either remove the
listenAddressparameter or add values to it in the form of a list when using theconfig.yamlfile. Do not leave the field empty or MicroShift crashes on restart.Example router setting with a single host IP address# ... ingress: listenAddress: - 10.2.1.100 # ...Example router setting with a combination of IP addresses and NIC names# ... ingress: listenAddress: - 10.2.1.100 - 10.2.2.10 - ens3 # ... -
Restart the MicroShift service by running the following command:
$ sudo systemctl restart microshift
-
To verify that your settings are applied, make sure that the
ingress.listenAddressIP addresses are reachable, then you cancurlthe route with the destination to one of these load balancer IP address.