|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * installing/installing_bare_metal/bare-metal-postinstallation-configuration.adoc |
| 4 | +// * installing/installing_with_agent_based_installer/installing-with-agent-based-installer.adoc |
| 5 | + |
| 6 | +:_mod-docs-content-type: PROCEDURE |
| 7 | +[id="creating-manifest-file-customized-br-ex-bridge-post_{context}"] |
| 8 | += Creating a manifest object that includes a customized br-ex bridge |
| 9 | + |
| 10 | +[role="_abstract"] |
| 11 | +Use the default OVS br-ex bridge configuration for standard environments. This configuration applies when you have a single network interface controller (NIC) and standard OVS settings. |
| 12 | + |
| 13 | +By default, {product-title} automatically configures the Open vSwitch (OVS) `br-ex` bridge on bare-metal nodes. For advanced networking requirements, you can override this default behavior on bare-metal platforms. To do this, create an `NodeNetworkConfigurationPolicy` (NNCP) custom resource (CR) that includes an NMState configuration file. |
| 14 | + |
| 15 | +The Kubernetes NMState Operator uses the NMState configuration file to create a customized `br-ex` bridge network configuration. This configuration applies to each node in your cluster. |
| 16 | + |
| 17 | +[IMPORTANT] |
| 18 | +==== |
| 19 | +After creating the `NodeNetworkConfigurationPolicy` CR, copy content from the installation NMState configuration file into the NNCP CR. An incomplete NNCP CR can result in loss of network connectivity, because the NNCP overrides all existing policies. |
| 20 | +==== |
| 21 | + |
| 22 | +Consider using the customized `br-ex` bridge configuration for any of the following tasks: |
| 23 | + |
| 24 | +* You need to modify the `br-ex` bridge after you installed the cluster. |
| 25 | +* You need to modify the maximum transmission unit (MTU) for your cluster. |
| 26 | +* You need to update DNS values. |
| 27 | +* You need to modify attributes for a different bond interface, such as MIImon (Media Independent Interface Monitor), bonding mode, or Quality of Service (QoS). |
| 28 | +* You need to enable Link Layer Discovery Protocol (LLDP) to discover and troubleshoot switch connectivity. |
| 29 | +
|
| 30 | +[WARNING] |
| 31 | +==== |
| 32 | +The following list of interface names are reserved and you cannot use the names with NMstate configurations: |
| 33 | +
|
| 34 | +* `br-ext` |
| 35 | +* `br-int` |
| 36 | +* `br-local` |
| 37 | +* `br-nexthop` |
| 38 | +* `br0` |
| 39 | +* `ext-vxlan` |
| 40 | +* `ext` |
| 41 | +* `genev_sys_*` |
| 42 | +* `int` |
| 43 | +* `k8s-*` |
| 44 | +* `ovn-k8s-*` |
| 45 | +* `patch-br-*` |
| 46 | +* `tun0` |
| 47 | +* `vxlan_sys_*` |
| 48 | +==== |
| 49 | + |
| 50 | +.Prerequisites |
| 51 | +* You have installed the Kubernetes NMState Operator. |
| 52 | +* You have identified the specific nodes where you want to apply the policy. |
| 53 | +
|
| 54 | +.Procedure |
| 55 | + |
| 56 | +* Create a `NodeNetworkConfigurationPolicy` (NNCP) CR and define a customized `br-ex` bridge network configuration. The `br-ex` NNCP CR must include the OVN-Kubernetes masquerade IP address and subnet of your network. The example NNCP CR includes default values in the `ipv4.address.ip` and `ipv6.address.ip` parameters. You can set the masquerade IP address in the `ipv4.address.ip`, `ipv6.address.ip`, or both parameters. |
| 57 | ++ |
| 58 | +[IMPORTANT] |
| 59 | +==== |
| 60 | +As a post-installation task, you cannot change the primary IP address of the customized `br-ex` bridge. If you want to convert your single-stack cluster network to a dual-stack cluster network, you can add or change a secondary IPv6 address in the NNCP CR, but the existing primary IP address cannot be changed. |
| 61 | +==== |
| 62 | ++ |
| 63 | +[source,yaml] |
| 64 | +---- |
| 65 | +apiVersion: nmstate.io/v1 |
| 66 | +kind: NodeNetworkConfigurationPolicy |
| 67 | +metadata: |
| 68 | + name: worker-0-br-ex |
| 69 | +spec: |
| 70 | + nodeSelector: |
| 71 | + kubernetes.io/hostname: worker-0 |
| 72 | + desiredState: |
| 73 | + interfaces: |
| 74 | + - name: enp2s0 |
| 75 | + type: ethernet |
| 76 | + state: up |
| 77 | + ipv4: |
| 78 | + enabled: false |
| 79 | + ipv6: |
| 80 | + enabled: false |
| 81 | + - name: br-ex |
| 82 | + type: ovs-bridge |
| 83 | + state: up |
| 84 | + ipv4: |
| 85 | + enabled: false |
| 86 | + dhcp: false |
| 87 | + ipv6: |
| 88 | + enabled: false |
| 89 | + dhcp: false |
| 90 | + bridge: |
| 91 | + options: |
| 92 | + mcast-snooping-enable: true |
| 93 | + port: |
| 94 | + - name: enp2s0 |
| 95 | + - name: br-ex |
| 96 | + - name: br-ex |
| 97 | + type: ovs-interface |
| 98 | + state: up |
| 99 | + copy-mac-from: enp2s0 |
| 100 | + ipv4: |
| 101 | + enabled: true |
| 102 | + dhcp: true |
| 103 | + auto-route-metric: 48 |
| 104 | + address: |
| 105 | + - ip: "169.254.0.2" |
| 106 | + prefix-length: 17 |
| 107 | + ipv6: |
| 108 | + enabled: true |
| 109 | + dhcp: true |
| 110 | + auto-route-metric: 48 |
| 111 | + address: |
| 112 | + - ip: "fd69::2" |
| 113 | + prefix-length: 112 |
| 114 | +# ... |
| 115 | +---- |
| 116 | ++ |
| 117 | +where: |
| 118 | ++ |
| 119 | +`metadata.name`:: Specifies the name of the policy. |
| 120 | +`interfaces.name`:: Specifies the name of the interface. |
| 121 | +`interfaces.type`:: Specifies the type of ethernet. |
| 122 | +`interfaces.state`:: Specifies the requested state for the interface after creation. |
| 123 | +`ipv4.enabled`:: Disables IPv4 and IPv6 in this example. |
| 124 | +`port.name`:: Specifies the node NIC to which the bridge is attached. |
| 125 | +`address.ip`:: Shows the default IPv4 and IPv6 IP addresses. Ensure that you set the masquerade IPv4 and IPv6 IP addresses of your network. |
| 126 | +`auto-route-metric`:: Set the parameter to `48` to ensure the `br-ex` default route always has the highest precedence (lowest metric). This configuration prevents routing conflicts with any other interfaces automatically configured by the `NetworkManager` service. |
| 127 | +
|
| 128 | +.Next steps |
| 129 | + |
| 130 | +* Scaling compute nodes to apply the manifest object that includes a customized `br-ex` bridge to each compute node that exists in your cluster. For more information, see "Expanding the cluster" in the _Additional resources_ section. |
0 commit comments