Skip to content

Commit 1c7877f

Browse files
authored
Merge pull request #45516 from kquinn1204/TELCODOCS-506
TELCODOCS-506 Creating first commit MetalLB CRDs handled by MetalLB a…
2 parents 77c9dd1 + b8ca779 commit 1c7877f

File tree

48 files changed

+1511
-277
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1511
-277
lines changed

_topic_maps/_topic_map.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1221,15 +1221,21 @@ Topics:
12211221
File: about-metallb
12221222
- Name: Installing the MetalLB Operator
12231223
File: metallb-operator-install
1224+
- Name: Upgrading the MetalLB Operator
1225+
File: metalb-upgrading-operator
12241226
- Name: Configuring MetalLB address pools
12251227
File: metallb-configure-address-pools
1228+
- Name: Advertising the IP address pools
1229+
File: about-advertising-ipaddresspool
12261230
- Name: Configuring MetalLB BGP peers
12271231
File: metallb-configure-bgp-peers
1232+
- Name: Advertising an IP address pool using the community alias
1233+
File: metallb-configure-community-alias
12281234
- Name: Configuring MetalLB BFD profiles
12291235
File: metallb-configure-bfd-profiles
12301236
- Name: Configuring services to use MetalLB
12311237
File: metallb-configure-services
1232-
- Name: MetalLB troubleshooting and support
1238+
- Name: MetalLB logging, troubleshooting, and support
12331239
File: metallb-troubleshoot-support
12341240
- Name: Associating secondary interfaces metrics to network attachments
12351241
File: associating-secondary-interfaces-metrics-to-network-attachments
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * networking/metallb/metallb-operator-install.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="installing-the-metallb-operator-using-web-console_{context}"]
7+
= Installing the MetalLB Operator from the OperatorHub using the web console
8+
9+
As a cluster administrator, you can install the MetalLB Operator by using the {product-title} web console.
10+
11+
.Prerequisites
12+
13+
* Log in as a user with `cluster-admin` privileges.
14+
15+
.Procedure
16+
17+
. In the {product-title} web console, navigate to *Operators* -> *OperatorHub*.
18+
19+
. Search for the MetalLB Operator, then click *Install*.
20+
21+
. On the *Install Operator* page, accept the defaults and click *Install*.
22+
23+
.Verification
24+
25+
. To confirm that the installation is successful:
26+
27+
.. Navigate to the *Operators* -> *Installed Operators* page.
28+
29+
.. Check that the Operator is installed in the `openshift-operators` namespace and that its status is `Succeeded`.
30+
31+
. If the Operator is not installed successfully, check the status of the Operator and review the logs:
32+
33+
.. Navigate to the *Operators* -> *Installed Operators* page and inspect the `Status` column for any errors or failures.
34+
35+
.. Navigate to the *Workloads* -> *Pods* page and check the logs in any pods in the `openshift-operators` project that are reporting issues.
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * networking/metallb/metallb-upgrading-operator.adoc
4+
5+
:_content-type: PROCEDURE
6+
7+
[id="upgrading-metallb-operator_{context}"]
8+
= Upgrading the MetalLB Operator
9+
10+
11+
.Prerequisites
12+
13+
* Access the cluster as a user with the `cluster-admin` role.
14+
15+
.Procedure
16+
17+
. Verify that the `metallb-system` namespace still exists:
18+
+
19+
[source,terminal]
20+
----
21+
$ oc get namespaces | grep metallb-system
22+
----
23+
+
24+
.Example output
25+
[source,terminal]
26+
----
27+
metallb-system Active 31m
28+
----
29+
30+
. Verify the `metallb` custom resource still exists:
31+
+
32+
[source,terminal]
33+
----
34+
$ oc get metallb -n metallb-system
35+
----
36+
+
37+
.Example output
38+
[source,terminal]
39+
----
40+
NAME AGE
41+
metallb 33m
42+
----
43+
44+
. Follow the guidance in "Installing from OperatorHub using the CLI" to install the latest {product-version} version of the MetalLB Operator.
45+
+
46+
[NOTE]
47+
====
48+
When installing the latest {product-version} version of the MetalLB Operator, you must install the Operator to the same namespace it was previously installed to.
49+
====
50+
51+
. Verify the upgraded version of the Operator is now the {product-version} version.
52+
+
53+
[source,terminal]
54+
----
55+
$ oc get csv -n metallb-system
56+
----
57+
+
58+
.Example output
59+
[source,terminal]
60+
----
61+
NAME DISPLAY VERSION REPLACES PHASE
62+
metallb-operator.4.11.0-202207051316 MetalLB Operator 4.11.0-202207051316 Succeeded
63+
----
64+
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * networking/metallb/metallb-upgrading-operator.adoc
4+
5+
:_content-type: PROCEDURE
6+
7+
[id="metalLB-operator-monitoring-upgrade-status_{context}"]
8+
= Monitoring upgrade status
9+
The best way to monitor the MetalLB Operator upgrade status is to watch the `ClusterServiceVersion` (CSV) `PHASE`.
10+
You can also monitor the CSV conditions in the web console or by running the `oc get csv` command.
11+
12+
[NOTE]
13+
====
14+
The `PHASE` and conditions values are approximations that are based on available information.
15+
====
16+
17+
.Prerequisites
18+
19+
* Access the cluster as a user with the `cluster-admin` role.
20+
21+
* Install the OpenShift CLI (`oc`).
22+
23+
.Procedure
24+
25+
. Run the following command:
26+
+
27+
[source,terminal]
28+
----
29+
$ oc get csv
30+
----
31+
32+
. Review the output, checking the `PHASE` field. For example:
33+
+
34+
[source,terminal]
35+
----
36+
VERSION REPLACES PHASE
37+
4.11.0 metallb-operator.4.10-nnnnnnnnnnnn Installing
38+
4.10.0 Replacing
39+
----
40+
41+
. Run `get csv` again to verify the output:
42+
+
43+
[source,terminal]
44+
----
45+
$ oc get csv
46+
----
47+
+
48+
.Example output
49+
[source,terminal]
50+
----
51+
NAME DISPLAY VERSION REPLACES PHASE
52+
metallb-operator.4.11-nnnnnnnnnnnn MetalLB 4.11.0 metallb-operator.v4.10.0 Succeeded
53+
----
Lines changed: 19 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
1-
2-
:_content-type: CONCEPT
31
// Module included in the following assemblies:
42
//
53
// * networking/metallb/metallb-configure-address-pools.adoc
6-
[id="nw-metallb-addresspool-cr_{context}"]
7-
= About the address pool custom resource
84

9-
The fields for the address pool custom resource are described in the following table.
5+
:_content-type: REFERENCE
6+
[id="nw-metallb-ipaddresspool-cr_{context}"]
7+
= About the IPAddressPool custom resource
8+
9+
[NOTE]
10+
====
11+
The address pool custom resource definition (CRD) and API documented in "Load balancing with MetalLB" in {product-title} 4.10 can still be used in {product-version}. However, the enhanced functionality associated with advertising the `IPAddressPools` with layer 2 or the BGP protocol is not supported when using the address pool CRD.
12+
====
1013

11-
.MetalLB address pool custom resource
14+
The fields for the `IPAddressPool` custom resource are described in the following table.
15+
16+
.MetalLB IPAddressPool pool custom resource
1217
[cols="1,1,3a", options="header"]
1318
|===
1419

@@ -27,65 +32,20 @@ The names `doc-example`, `silver`, and `gold` are used throughout the documentat
2732
|Specifies the namespace for the address pool.
2833
Specify the same namespace that the MetalLB Operator uses.
2934

30-
|`spec.protocol`
35+
|`metadata.label`
3136
|`string`
32-
|Specifies the protocol for announcing the load balancer IP address to peer nodes.
33-
Specify `layer2` or `bgp`.
37+
|Optional: Specifies the key value pair assigned to the `IPAddressPool`. This can be referenced by the `ipAddressPoolSelectors` in the `BGPAdvertisement` and `L2Advertisement` CRD to associate the `IPAddressPool` with the advertisement
38+
39+
|`spec.addresses`
40+
|`string`
41+
|Specifies a list of IP addresses for MetalLB Operator to assign to services.
42+
You can specify multiple ranges in a single pool; they will all share the same settings.
43+
Specify each range in CIDR notation or as starting and ending IP addresses separated with a hyphen.
3444

3545
|`spec.autoAssign`
3646
|`boolean`
3747
|Optional: Specifies whether MetalLB automatically assigns IP addresses from this pool.
3848
Specify `false` if you want explicitly request an IP address from this pool with the `metallb.universe.tf/address-pool` annotation.
3949
The default value is `true`.
4050

41-
|`spec.addresses`
42-
|`array`
43-
|Specifies a list of IP addresses for MetalLB to assign to services.
44-
You can specify multiple ranges in a single pool.
45-
Specify each range in CIDR notation or as starting and ending IP addresses separated with a hyphen.
46-
47-
|`spec.bgpAdvertisements`
48-
|`object`
49-
|Optional: By default, BGP mode advertises each allocated load-balancer IP address to the configured peers with no additional BGP attributes.
50-
The peer routers receive one `/32` route for each service IP address, with the BGP local preference set to zero and no BGP communities.
51-
Use this field to create custom advertisements.
52-
53-
|===
54-
55-
The fields for the `bgpAdvertisements` object are defined in the following table:
56-
57-
.BGP advertisements configuration
58-
[cols="1,1,3a", options="header"]
59-
|===
60-
61-
|Field
62-
|Type
63-
|Description
64-
65-
|`aggregationLength`
66-
|`integer`
67-
|Optional: Specifies the number of bits to include in a 32-bit CIDR mask.
68-
To aggregate the routes that the speaker advertises to BGP peers, the mask is applied to the routes for several service IP addresses and the speaker advertises the aggregated route.
69-
For example, with an aggregation length of `24`, the speaker can aggregate several `10.0.1.x/32` service IP addresses and advertise a single `10.0.1.0/24` route.
70-
71-
|`aggregationLengthV6`
72-
|`integer`
73-
|Optional: Specifies the number of bits to include in a 128-bit CIDR mask.
74-
For example, with an aggregation length of `124`, the speaker can aggregate several `fc00:f853:0ccd:e799::x/128` service IP addresses and advertise a single `fc00:f853:0ccd:e799::0/124` route.
75-
76-
|`community`
77-
|`array`
78-
|Optional: Specifies one or more BGP communities.
79-
Each community is specified as two 16-bit values separated by the colon character.
80-
Well-known communities must be specified as 16-bit values:
81-
82-
* `NO_EXPORT`: `65535:65281`
83-
* `NO_ADVERTISE`: `65535:65282`
84-
* `NO_EXPORT_SUBCONFED`: `65535:65283`
85-
86-
|`localPref`
87-
|`integer`
88-
|Optional: Specifies the local preference for this advertisement.
89-
This BGP attribute applies to BGP sessions within the Autonomous System.
90-
9151
|===
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * networking/metallb/about-advertising-ipaddresspool.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="nw-metallb-advertise-an-advanced-address-pool-configuration-bgp_{context}"]
7+
= Example 2: Advertise an advanced address pool configuration with BGP
8+
9+
Configure MetalLB as follows so that the `IPAddressPool` is advertised with the BGP protocol.
10+
11+
.Prerequisites
12+
13+
* Install the OpenShift CLI (`oc`).
14+
15+
* Log in as a user with `cluster-admin` privileges.
16+
17+
.Procedure
18+
19+
. Create an IP address pool.
20+
21+
.. Create a file, such as `ipaddresspool.yaml`, with content like the following example:
22+
+
23+
[source,yaml]
24+
----
25+
apiVersion: metallb.io/v1beta1
26+
kind: IPAddressPool
27+
metadata:
28+
namespace: metallb-system
29+
name: doc-example-bgp-adv
30+
labels:
31+
zone: east
32+
spec:
33+
addresses:
34+
- 203.0.113.200/30
35+
- fc00:f853:ccd:e799::/124
36+
autoAssign: false
37+
----
38+
39+
.. Apply the configuration for the IP address pool:
40+
+
41+
[source,terminal]
42+
----
43+
$ oc apply -f ipaddresspool.yaml
44+
----
45+
46+
. Create a BGP advertisement.
47+
48+
.. Create a file, such as `bgpadvertisement1.yaml`, with content like the following example:
49+
+
50+
[source,yaml]
51+
----
52+
apiVersion: metallb.io/v1beta1
53+
kind: BGPAdvertisement
54+
metadata:
55+
name: bgpadvertisement-adv-1
56+
namespace: metallb-system
57+
spec:
58+
ipAddressPools:
59+
- doc-example-bgp-adv
60+
- communities:
61+
- 65535:65282
62+
aggregationLength: 32
63+
localPref: 100
64+
----
65+
66+
.. Apply the configuration:
67+
+
68+
[source,terminal]
69+
----
70+
$ oc apply -f bgpadvertisement1.yaml
71+
----
72+
73+
.. Create a file, such as `bgpadvertisement2.yaml`, with content like the following example:
74+
+
75+
[source,yaml]
76+
----
77+
apiVersion: metallb.io/v1beta1
78+
kind: BGPAdvertisement
79+
metadata:
80+
name: bgpadvertisement-adv-2
81+
namespace: metallb-system
82+
spec:
83+
ipAddressPools:
84+
- doc-example-bgp-adv
85+
- communities:
86+
- 8000:800
87+
aggregationLength: 30
88+
aggregationLengthV6: 124
89+
----
90+
91+
.. Apply the configuration:
92+
+
93+
[source,terminal]
94+
----
95+
$ oc apply -f bgpadvertisement2.yaml
96+
----

0 commit comments

Comments
 (0)