Skip to content

Commit 93e4bc6

Browse files
authored
Merge pull request #83769 from kquinn1204/TELCODOCS-1853
TELCODOCS-1853 Issue in file networking/metallb/metallb-operator-inst…
2 parents 6aa8f43 + 05b99c3 commit 93e4bc6

File tree

2 files changed

+70
-0
lines changed

2 files changed

+70
-0
lines changed
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
:_mod-docs-content-type: PROCEDURE
2+
[id="nw-metallb-configure-address-pool-vlan_{context}"]
3+
= Configure MetalLB address pool for VLAN
4+
5+
As a cluster administrator, you can add address pools to your cluster to control the IP addresses on a created VLAN that MetalLB can assign to load-balancer services
6+
7+
.Prerequisites
8+
9+
* Install the OpenShift CLI (`oc`).
10+
11+
* Configure a separate VLAN.
12+
13+
* Log in as a user with `cluster-admin` privileges.
14+
15+
.Procedure
16+
17+
. Create a file, such as `ipaddresspool-vlan.yaml`, that is similar to the following example:
18+
+
19+
[source,yaml]
20+
----
21+
apiVersion: metallb.io/v1beta1
22+
kind: IPAddressPool
23+
metadata:
24+
namespace: metallb-system
25+
name: doc-example-vlan
26+
labels:
27+
zone: east <1>
28+
spec:
29+
addresses:
30+
- 192.168.100.1-192.168.100.254 <2>
31+
----
32+
<1> This label assigned to the `IPAddressPool` can be referenced by the `ipAddressPoolSelectors` in the `BGPAdvertisement` CRD to associate the `IPAddressPool` with the advertisement.
33+
<2> This IP range must match the subnet assigned to the VLAN on your network. To support layer 2 (L2) mode, the IP address range must be within the same subnet as the cluster nodes.
34+
35+
. Apply the configuration for the IP address pool:
36+
+
37+
[source,terminal]
38+
----
39+
$ oc apply -f ipaddresspool-vlan.yaml
40+
----
41+
42+
. To ensure this configuration applies to the VLAN you need to set the `spec` `gatewayConfig.ipForwarding` to `Global`.
43+
+
44+
.. Run the following command to edit the network configuration custom resource (CR):
45+
+
46+
[source,terminal]
47+
----
48+
$ oc edit network.config.openshift/cluster
49+
----
50+
+
51+
.. Update the `spec.defaultNetwork.ovnKubernetesConfig` section to include the `gatewayConfig.ipForwarding` set to `Global`. It should look something like this:
52+
+
53+
.Example
54+
[source,yaml]
55+
----
56+
...
57+
spec:
58+
clusterNetwork:
59+
- cidr: 10.128.0.0/14
60+
hostPrefix: 23
61+
defaultNetwork:
62+
type: OVNKubernetes
63+
ovnKubernetesConfig:
64+
gatewayConfig:
65+
ipForwarding: Global
66+
...
67+
----

networking/metallb/metallb-configure-address-pools.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ include::modules/nw-metallb-addresspool-cr.adoc[leveloffset=+1]
1515
// Add an address pool
1616
include::modules/nw-metallb-configure-address-pool.adoc[leveloffset=+1]
1717

18+
// Supporting VLAN setup
19+
include::modules/nw-metallb-configure-address-pool-vlan.adoc[leveloffset=+1]
20+
1821
// Examples
1922
include::modules/nw-metallb-example-addresspool.adoc[leveloffset=+1]
2023

0 commit comments

Comments
 (0)