Skip to content

Commit ace8936

Browse files
committed
OSDOCS-8895: introduce network config options and limits
1 parent 91b0f3e commit ace8936

9 files changed

+239
-135
lines changed

microshift_configuring/microshift-using-config-tools.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ A YAML file customizes {microshift-short} instances with your preferences, setti
1010

1111
include::snippets/microshift-greenboot-status-snip.adoc[leveloffset=+2]
1212

13+
include::modules/microshift-default-settings.adoc[leveloffset=+1]
14+
1315
include::modules/microshift-config-yaml.adoc[leveloffset=+1]
1416

17+
include::modules/microshift-nw-advertise-address.adoc[leveloffset=+2]
18+
1519
include::modules/microshift-config-nodeport-limits.adoc[leveloffset=+2]
1620

1721
[id="additional-resources_microshift-using-config-tools_{context}"]

microshift_networking/microshift-cni.adoc

Lines changed: 38 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -6,109 +6,67 @@ include::_attributes/attributes-microshift.adoc[]
66

77
toc::[]
88

9-
OVN-Kubernetes is the default networking solution for {microshift-short} deployments. OVN-Kubernetes is a virtualized network for pods and services that is based on Open Virtual Network (OVN). The OVN-Kubernetes Container Network Interface (CNI) plugin is the network plugin for the cluster. A cluster that uses the OVN-Kubernetes network plugin also runs Open vSwitch (OVS) on the node. OVN configures OVS on the node to implement the declared network configuration.
10-
11-
[id="microshift-network-topology_{context}"]
12-
== Network topology
13-
OVN-Kubernetes provides an overlay-based networking implementation. This overlay includes an OVS-based implementation of Service and NetworkPolicy. The overlay network uses the Geneve (Generic Network Virtualization Encapsulation) tunnel protocol. The pod maximum transmission unit (MTU) for the Geneve tunnel is set to a smaller value than the MTU of the physical interface on the host. This smaller MTU makes room for the required information that is added to the tunnel header before it is transmitted.
14-
15-
OVS runs as a systemd service on the {microshift-short} node. The OVS RPM package is installed as a dependency to the `microshift-networking` RPM package. OVS is started immediately when the `microshift-networking` RPM is installed.
16-
17-
.{product-title} network topology
18-
image:317_RHbM_OVN_topology_0923.png[title="{microshift-short} uses an overlay-based networking implementation, details follow."]
19-
20-
[id="microshift-description-ovn-logical-components_{context}"]
21-
=== Description of the OVN logical components of the virtualized network
22-
OVN node switch::
23-
A virtual switch named `<node-name>`. The OVN node switch is named according to the hostname of the node.
24-
** In this example, the `node-name` is `microshift-dev`.
25-
26-
OVN cluster router::
27-
A virtual router named `ovn_cluster_router`, also known as the distributed router.
28-
** In this example, the cluster network is `10.42.0.0/16`.
29-
30-
OVN join switch::
31-
A virtual switch named `join`.
32-
33-
OVN gateway router::
34-
A virtual router named `GR_<node-name>`, also known as the external gateway router.
35-
36-
OVN external switch::
37-
A virtual switch named `ext_<node-name>.`
38-
39-
[id="microshift-description-connections-network-topology_{context}"]
40-
=== Description of the connections in the network topology figure
41-
* The north-south traffic between the network service and the OVN external switch `ext_microshift-dev`, is provided through the host kernel by the gateway bridge `br-ex`.
42-
* The OVN gateway router `GR_microshift-dev` is connected to the external network switch `ext_microshift-dev` through the logical router port 4. Port 4 is attached with the node IP address 192.168.122.14.
43-
* The join switch `join` connects the OVN gateway router `GR_microshift-dev` to the OVN cluster router `ovn_cluster_router`. The IP address range is 100.62.0.0/16.
44-
** The OVN gateway router `GR_microshift-dev` connects to the OVN join switch `join` through the logical router port 3. Port 3 attaches with the internal IP address 100.64.0.2.
45-
** The OVN cluster router `ovn_cluster_router` connects to the join switch `join` through the logical router port 2. Port 2 attaches with the internal IP address 100.64.0.1.
46-
* The OVN cluster router `ovn_cluster_router` connects to the node switch `microshift-dev` through the logical router port 1. Port 1 is attached with the OVN cluster network IP address 10.42.0.1.
47-
* The east-west traffic between the pods and the network service is provided by the OVN cluster router `ovn_cluster_router` and the node switch `microshift-dev`. The IP address range is 10.42.0.0/24.
48-
* The east-west traffic between pods is provided by the node switch `microshift-dev` without network address translation (NAT).
49-
* The north-south traffic between the pods and the external network is provided by the OVN cluster router `ovn_cluster_router` and the host network. This router is connected through the `ovn-kubernetes` management port `ovn-k8s-mp0`, with the IP address 10.42.0.2.
50-
* All the pods are connected to the OVN node switch through their interfaces.
51-
** In this example, Pod 1 and Pod 2 are connected to the node switch through `Interface 1` and `Interface 2`.
9+
The OVN-Kubernetes Container Network Interface (CNI) plugin is the default networking solution for {microshift-short} clusters. OVN-Kubernetes is a virtualized network for pods and services that is based on Open Virtual Network (OVN).
5210

53-
[id="microshift-ip-forward_{context}"]
54-
== IP forward
55-
The host network `sysctl net.ipv4.ip_forward` kernel parameter is automatically enabled by the `ovnkube-master` container when started. This is required to forward incoming traffic to the CNI. For example, accessing the NodePort service from outside of a cluster fails if `ip_forward` is disabled.
11+
* Default network configuration and connections are applied automatically in {microshift-short} with the `microshift-networking` RPM during installation.
12+
* A cluster that uses the OVN-Kubernetes network plugin also runs Open vSwitch (OVS) on the node.
13+
* OVN-K configures OVS on the node to implement the declared network configuration.
14+
* Host physical interfaces are not bound by default to the OVN-K gateway bridge, `br-ex`. You can use standard tools on the host for managing the default gateway, such as the Network Manager CLI (`nmcli`).
15+
* Changing the CNI is not supported on {microshift-short}.
5616
57-
[id="microshift-network-performance_{context}"]
58-
== Network performance optimizations
59-
By default, three performance optimizations are applied to OVS services to minimize resource consumption:
17+
Using configuration files or custom scripts, you can configure the following networking settings:
6018

61-
* CPU affinity to `ovs-vswitchd.service` and `ovsdb-server.service`
62-
* `no-mlockall` to `openvswitch.service`
63-
* Limit handler and `revalidator` threads to `ovs-vswitchd.service`
19+
* You can use subnet CIDR ranges to allocate IP addresses to pods.
20+
* You can change the maximum transmission unit (MTU) value.
21+
* You can configure firewall ingress and egress.
22+
* You can define network policies in the {microshift-short} cluster, including ingress and egress rules.
23+
24+
include::modules/microshift-cni-customization-matrix.adoc[leveloffset=+1]
25+
26+
include::modules/microshift-default-settings.adoc[leveloffset=+2]
6427

6528
[id="microshift-network-features_{context}"]
6629
== Network features
67-
Networking features available with {product-title} {product-version} include:
30+
Networking features available with {microshift-short} {product-version} include:
6831

6932
* Kubernetes network policy
7033
* Dynamic node IP
34+
* Custom gateway interface
35+
* Second gateway interface
7136
* Cluster network on specified host interface
37+
* Blocking external access to NodePort service on specific host interfaces
7238

73-
Networking features not available with {product-title} {product-version}:
39+
Networking features not available with {microshift-short} {product-version}:
7440

75-
* Egress IP/firewall/qos: disabled
41+
* Egress IP/firewall/QoS: disabled
7642
* Hybrid networking: not supported
7743
* IPsec: not supported
7844
* Hardware offload: not supported
7945

80-
//Q: are there immutable network settings we should tell users about?
81-
[id="microshift-network-comps-svcs_{context}"]
82-
== {microshift-short} networking components and services
83-
This brief overview describes networking components and their operation in {microshift-short}. The `microshift-networking` RPM is a package that automatically pulls in any networking-related dependencies and systemd services to initialize networking, for example, the `microshift-ovs-init` systemd service.
46+
[id="_additional-resources_microshift-cni_{context}"]
47+
[role="_additional-resources"]
48+
.Additional resources
8449

85-
NetworkManager::
86-
NetworkManager is required to set up the initial gateway bridge on the {microshift-short} node. The NetworkManager and `NetworkManager-ovs` RPM packages are installed as dependencies to the `microshift-networking` RPM package, which contains the necessary configuration files. NetworkManager in {microshift-short} uses the `keyfile` plugin and is restarted after installation of the `microshift-networking` RPM package.
50+
* xref:../microshift_configuring/microshift-using-config-tools.adoc#microshift-using-config-tools_microshift-config-yaml[Using a YAML configuration file]
8751

88-
microshift-ovs-init::
89-
The `microshift-ovs-init.service` is installed by the `microshift-networking` RPM package as a dependent systemd service to microshift.service. It is responsible for setting up the OVS gateway bridge.
52+
* xref:../microshift_networking/microshift-networking-settings.adoc#microshift-config-OVN-K_microshift-networking[Understanding networking settings]
9053

91-
OVN containers::
92-
Two OVN-Kubernetes daemon sets are rendered and applied by {microshift-short}.
93-
94-
* *ovnkube-master*
95-
Includes the `northd`, `nbdb`, `sbdb` and `ovnkube-master` containers.
54+
[id="microshift-ip-forward_{context}"]
55+
== IP forward
56+
The host network `sysctl net.ipv4.ip_forward` kernel parameter is automatically enabled by the `ovnkube-master` container when started. This is required to forward incoming traffic to the CNI. For example, accessing the NodePort service from outside of a cluster fails if `ip_forward` is disabled.
9657

97-
* *ovnkube-node*
98-
The ovnkube-node includes the OVN-Controller container.
99-
+
100-
After {microshift-short} boots, the OVN-Kubernetes daemon sets are deployed in the `openshift-ovn-kubernetes` namespace.
58+
[id="microshift-network-performance_{context}"]
59+
== Network performance optimizations
60+
By default, three performance optimizations are applied to OVS services to minimize resource consumption:
10161

102-
Packaging::
103-
OVN-Kubernetes manifests and startup logic are built into {microshift-short}. The systemd services and configurations included in `microshift-networking` RPM are:
62+
* CPU affinity to `ovs-vswitchd.service` and `ovsdb-server.service`
63+
* `no-mlockall` to `openvswitch.service`
64+
* Limit handler and `revalidator` threads to `ovs-vswitchd.service`
10465

105-
* `/etc/NetworkManager/conf.d/microshift-nm.conf` for NetworkManager.service
106-
* `/etc/systemd/system/ovs-vswitchd.service.d/microshift-cpuaffinity.conf` for ovs-vswitchd.service
107-
* `/etc/systemd/system/ovsdb-server.service.d/microshift-cpuaffinity.conf`for ovs-server.service
108-
* `/usr/bin/configure-ovs-microshift.sh` for microshift-ovs-init.service
109-
* `/usr/bin/configure-ovs.sh` for microshift-ovs-init.service
110-
* `/etc/crio/crio.conf.d/microshift-ovn.conf` for CRI-O service
66+
include::modules/microshift-nw-components-svcs.adoc[leveloffset=+1]
11167

11268
[id="microshift-bridge-mapping_{context}"]
11369
== Bridge mappings
11470
Bridge mappings allow provider network traffic to reach the physical network. Traffic leaves the provider network and arrives at the `br-int` bridge. A patch port between `br-int` and `br-ex` then allows the traffic to traverse to and from the provider network and the edge network. Kubernetes pods are connected to the `br-int` bridge through virtual ethernet pair: one end of the virtual ethernet pair is attached to the pod namespace, and the other end is attached to the `br-int` bridge.
71+
72+
include::modules/microshift-nw-topology.adoc[leveloffset=+1]

microshift_networking/microshift-networking-settings.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
:_mod-docs-content-type: ASSEMBLY
2-
[id="microshift-applying-networking-settings"]
2+
[id="microshift-understanding-networking-settings"]
33
= Understanding networking settings
44
include::_attributes/attributes-microshift.adoc[]
55
:context: microshift-networking
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
2+
:_mod-docs-content-type: REFERENCE
3+
[id="microshift-nw-customization-matrix_{context}"]
4+
= {microshift-short} networking customization matrix
5+
6+
The following table summarizes the status of networking features and capabilities that are either present as defaults, supported for configuration, or not available with the {microshift-short} service:
7+
8+
.{microshift-short} networking capabilities and customization status
9+
[cols="50%,20%,30%",options="header"]
10+
|===
11+
|Network feature|Availability|Customization supported
12+
13+
|Advertise address|Yes|Yes ^[1]^
14+
15+
|Kubernetes network policy|Yes|Yes
16+
17+
|Kubernetes network policy logs|Not available|N/A
18+
19+
|Load balancing|Yes|Yes
20+
21+
|Multicast DNS|Yes|Yes ^[2]^
22+
23+
|Network proxies|Yes ^[3]^|CRI-O
24+
25+
|Network performance|Yes|MTU configuration
26+
27+
|Egress IPs|Not available|N/A
28+
29+
|Egress firewall|Not available|N/A
30+
31+
|Egress router|Not available|N/A
32+
33+
|Firewall|No ^[4]^|Yes
34+
35+
|Hardware offloading|Not available|N/A
36+
37+
|Hybrid networking|Not available|N/A
38+
39+
|IPsec encryption for intra-cluster communication|Not available|N/A
40+
41+
|IPv6|Not available ^[5]^|N/A
42+
|===
43+
44+
1. If unset, the default value is set to the next immediate subnet after the service network. For example, when the service network is `10.43.0.0/16`, the `advertiseAddress` is set to `10.44.0.0/32`.
45+
2. You can use the multicast DNS protocol (mDNS) to allow name resolution and service discovery within a Local Area Network (LAN) using multicast exposed on the `5353/UDP` port.
46+
3. There is no built-in transparent proxying of egress traffic in {microshift-short}. Egress must be manually configured.
47+
4. Setting up the firewalld service is supported by {op-system-ostree}.
48+
5. IPv6 is not available in any configuration.

modules/microshift-config-yaml.adoc

Lines changed: 2 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -6,65 +6,13 @@
66
[id="microshift-config-yaml_{context}"]
77
= Using a YAML configuration file
88

9-
On start up, {microshift-short} searches the system-wide `/etc/microshift/` directory for a configuration file named `config.yaml`. To use custom configurations, you must create the configuration file and specify any settings that should override the defaults before starting {microshift-short}.
10-
11-
[id="microshift-yaml-default_{context}"]
12-
== Default settings
13-
If you do not create a `config.yaml` file, the default values are used. The following example shows the default configuration settings.
14-
15-
* You can use the following command to see the default values:
16-
+
17-
[source,terminal]
18-
----
19-
$ microshift show-config
20-
----
21-
+
22-
.Default values example output in YAML form
23-
[source,yaml]
24-
----
25-
dns:
26-
baseDomain: microshift.example.com <1>
27-
network:
28-
clusterNetwork:
29-
- 10.42.0.0/16 <2>
30-
serviceNetwork:
31-
- 10.43.0.0/16 <3>
32-
serviceNodePortRange: 30000-32767 <4>
33-
node:
34-
hostnameOverride: "" <5>
35-
nodeIP: "" <6>
36-
apiServer:
37-
advertiseAddress: 10.44.0.0 <7>
38-
subjectAltNames: [] <8>
39-
debugging:
40-
logLevel: "Normal" <9>
41-
----
42-
<1> Base domain of the cluster. All managed DNS records will be subdomains of this base.
43-
<2> A block of IP addresses from which Pod IP addresses are allocated.
44-
<3> A block of virtual IP addresses for Kubernetes services.
45-
<4> The port range allowed for Kubernetes services of type NodePort.
46-
<5> The name of the node. The default value is the hostname.
47-
<6> The IP address of the node. The default value is the IP address of the default route.
48-
<7> A string that specifies the IP address from which the API server is advertised to members of the cluster. The default value is calculated based on the address of the service network.
49-
<8> Subject Alternative Names for API server certificates.
50-
<9> Log verbosity. Valid values for this field are `Normal`, `Debug`, `Trace`, or `TraceAll`.
9+
On start up, {microshift-short} searches the system-wide `/etc/microshift/` directory for a configuration file named `config.yaml`. To use custom configurations, you must create the configuration file and specify any settings that are expected to override the defaults before starting {microshift-short}.
5110

5211
[id="microshift-yaml-custom_{context}"]
5312
== Custom settings
54-
To create custom configurations, you must create a `config.yaml` file in the `/etc/microshift/` directory, then change any settings that should override the defaults before starting or restarting {microshift-short}.
13+
To create custom configurations, you must create a `config.yaml` file in the `/etc/microshift/` directory, and then change any settings that are expected to override the defaults before starting or restarting {microshift-short}.
5514

5615
[IMPORTANT]
5716
====
5817
Restart {microshift-short} after changing any configuration settings to have them take effect. The `config.yaml` file is read only when {microshift-short} starts.
5918
====
60-
61-
[id="microshift-yaml-advertiseAddress_{context}"]
62-
=== advertiseAddress
63-
The `apiserver.advertiseAddress` flag specifies the IP address on which to advertise the API server to members of the cluster. This address must be reachable by the cluster. You can set a custom IP address here, but you must also add the IP address to a host interface. Customizing this parameter preempts {microshift-short} from adding a default IP address to the `br-ex` network interface.
64-
65-
[IMPORTANT]
66-
====
67-
If you customize the `advertiseAddress` IP address, make sure it is reachable by the cluster when {microshift-short} starts by adding the IP address to a host interface.
68-
====
69-
70-
If unset, the default value is `10.44.0.0/32`. It will be set to the next immediate subnet after the service network. For example, when the service network is `10.43.0.0/16`, the `advertiseAddress` is set to `10.44.0.0/32`.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * microshift_configuring/microshift-using-config-tools.adoc
4+
// * microshift_networking/
5+
6+
:_mod-docs-content-type: CONCEPT
7+
[id="microshift-yaml-default_{context}"]
8+
= Default settings
9+
10+
If you do not create a `config.yaml` file, default values are used. The following example shows the default configuration settings.
11+
12+
* To see the default values, run the following command:
13+
+
14+
[source,terminal]
15+
----
16+
$ microshift show-config
17+
----
18+
+
19+
.Default values example output in YAML form
20+
[source,yaml]
21+
----
22+
dns:
23+
baseDomain: microshift.example.com <1>
24+
network:
25+
clusterNetwork:
26+
- 10.42.0.0/16 <2>
27+
serviceNetwork:
28+
- 10.43.0.0/16 <3>
29+
serviceNodePortRange: 30000-32767 <4>
30+
node:
31+
hostnameOverride: "" <5>
32+
nodeIP: "" <6>
33+
apiServer:
34+
advertiseAddress: 10.44.0.0/32 <7>
35+
subjectAltNames: [] <8>
36+
debugging:
37+
logLevel: "Normal" <9>
38+
----
39+
<1> Base domain of the cluster. All managed DNS records will be subdomains of this base.
40+
<2> A block of IP addresses from which Pod IP addresses are allocated.
41+
<3> A block of virtual IP addresses for Kubernetes services.
42+
<4> The port range allowed for Kubernetes services of type NodePort.
43+
<5> The name of the node. The default value is the hostname.
44+
<6> The IP address of the node. The default value is the IP address of the default route.
45+
<7> A string that specifies the IP address from which the API server is advertised to members of the cluster. The default value is calculated based on the address of the service network.
46+
<8> Subject Alternative Names for API server certificates.
47+
<9> Log verbosity. Valid values for this field are `Normal`, `Debug`, `Trace`, or `TraceAll`.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * microshift/using-config-tools.adoc
4+
5+
:_mod-docs-content-type: CONCEPT
6+
[id="microshift-yaml-advertiseAddress_{context}"]
7+
= Configuring the advertise address network flag
8+
9+
The `apiserver.advertiseAddress` flag specifies the IP address on which to advertise the API server to members of the cluster. This address must be reachable by the cluster. You can set a custom IP address here, but you must also add the IP address to a host interface. Customizing this parameter preempts {microshift-short} from adding a default IP address to the `br-ex` network interface.
10+
11+
[IMPORTANT]
12+
====
13+
If you customize the `advertiseAddress` IP address, make sure it is reachable by the cluster when {microshift-short} starts by adding the IP address to a host interface.
14+
====
15+
16+
If unset, the default value is set to the next immediate subnet after the service network. For example, when the service network is `10.43.0.0/16`, the `advertiseAddress` is set to `10.44.0.0/32`.

0 commit comments

Comments
 (0)