Skip to content

Commit 0637c5a

Browse files
authored
Merge pull request #75492 from slovern/TELCODOCS-1682
TELCODOCS-1682 - MetalLB - FRRK8s integration
2 parents 2717f06 + 664eb22 commit 0637c5a

7 files changed

+575
-0
lines changed

_topic_maps/_topic_map.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1619,6 +1619,8 @@ Topics:
16191619
File: metallb-configure-services
16201620
- Name: Managing symmetric routing with MetalLB
16211621
File: metallb-configure-return-traffic
1622+
- Name: Configuring the integration of MetalLB and FRR-K8s
1623+
File: metallb-frr-k8s
16221624
- Name: MetalLB logging, troubleshooting, and support
16231625
File: metallb-troubleshoot-support
16241626
- Name: Associating secondary interfaces metrics to network attachments
49.1 KB
Loading
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * networking/metallb/metallb-frr-k8s.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="nw-metallb-configuring-frr-k8s_{context}"]
7+
= Activating the integration of MetalLB and FRR-K8s
8+
9+
The following procedure shows you how to activate `FRR-K8s` as the backend for `MetalLB`.
10+
11+
.Prerequisites
12+
13+
* You have a cluster installed on bare-metal hardware.
14+
* You have installed the OpenShift CLI (`oc`).
15+
* You have logged in as a user with `cluster-admin` privileges.
16+
17+
.Procedure
18+
19+
* Set the `bgpBackend` field of the `MetalLB` CR to `frr-k8s` as in the following example:
20+
+
21+
[source,yaml]
22+
----
23+
apiVersion: metallb.io/v1beta1
24+
kind: MetalLB
25+
metadata:
26+
name: metallb
27+
namespace: metallb-system
28+
spec:
29+
bgpBackend: frr-k8s
30+
----
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * networking/metallb/metallb-frr-k8s.adoc
4+
5+
:_mod-docs-content-type: REFERENCE
6+
[id="nw-metallb-configuring-frr-k8s-configuratons_{context}"]
7+
= FRR configurations
8+
9+
You can create multiple `FRRConfiguration` CRs to use `FRR` services in `MetalLB`.
10+
`MetalLB` generates an `FRRConfiguration` object which `FRR-K8s` merges with all other configurations that all users have created.
11+
12+
For example, you can configure `FRR-K8s` to receive all of the prefixes advertised by a given neighbor.
13+
The following example configures `FRR-K8s` to receive all of the prefixes advertised by a `BGPPeer` with host `172.18.0.5`:
14+
15+
.Example FRRConfiguration CR
16+
[source,yaml]
17+
----
18+
apiVersion: frrk8s.metallb.io/v1beta1
19+
kind: FRRConfiguration
20+
metadata:
21+
name: test
22+
namespace: metallb-system
23+
spec:
24+
bgp:
25+
routers:
26+
- asn: 64512
27+
neighbors:
28+
- address: 172.18.0.5
29+
asn: 64512
30+
toReceive:
31+
allowed:
32+
mode: all
33+
----
34+
35+
You can also configure FRR-K8s to always block a set of prefixes, regardless of the configuration applied.
36+
This can be useful to avoid routes towards the pods or `ClusterIPs` CIDRs that might result in cluster malfunctions.
37+
The following example blocks the set of prefixes `192.168.1.0/24`:
38+
39+
.Example MetalLB CR
40+
[source,yaml]
41+
----
42+
apiVersion: metallb.io/v1beta1
43+
kind: MetalLB
44+
metadata:
45+
name: metallb
46+
namespace: metallb-system
47+
spec:
48+
bgpBackend: frr-k8s
49+
frrk8sConfig:
50+
alwaysBlock:
51+
- 192.168.1.0/24
52+
----
53+
You can set `FRR-K8s` to block the `Cluster Network` CIDR and `Service Network` CIDR.
54+
You can view the values for these CIDR address specifications by running the following command:
55+
56+
[source,terminal]
57+
----
58+
$ oc describe network.config/cluster
59+
----

0 commit comments

Comments
 (0)