第 3 章 Understanding and configuring the router
Learn about default and custom settings for configuring the router and route admission policy with MicroShift.
3.1. About configuring the router 复制链接链接已复制到粘贴板!
To make ingress optional, you can configure MicroShift ingress router settings to manage which ports, if any, are exposed to network traffic. Specified routing is an example of ingress load balancing.
-
The default ingress router is always on, running on all IP addresses on the
http: 80andhttps: 443ports. - Default router settings allow access to any namespace.
Some applications running on top of MicroShift might not require the default router and instead create their own. You can configure the router to control both ingress and namespace access.
You can check for the presence of the default router in your MicroShift installation before you begin configurations by using the oc get deployment -n openshift-ingress command, which returns the following output:
NAME READY UP-TO-DATE AVAILABLE AGE
router-default 1/1 1 1 2d23h
3.1.1. Router settings and valid values 复制链接链接已复制到粘贴板!
The ingress router settings consist of the following parameters and valid values:
Example config.yaml router settings
# ...
ingress:
listenAddress:
- ""
ports:
http: 80
https: 443
routeAdmissionPolicy:
namespaceOwnership: InterNamespaceAllowed
status: Managed
# ...
- 1
- The
ingress.listenAddressvalue defaults to the entire network of the host. Valid customizable values can be a single IP address or host name or a list of IP addresses or host names. - 2
- Valid values for both port entries are a single, unique port in the 1-65535 range. The values of the
ports.httpandports.httpsfields cannot be the same. - 3
- Default value. Allows routes to claim different paths of the same host name across namespaces.
- 4
- Default value.
Managedis required for the ingress ports to remain open.
The firewalld service is bypassed by the default MicroShift router and by configurations that enable the router. Ingress and egress must be controlled by setting network policies when the router is active.