1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/nw-metallb-configure-bgppeer.adoc

45 lines
1.2 KiB
Plaintext

// Module included in the following assemblies:
//
// * networking/metallb/metallb-configure-bgp-peers.adoc
:_mod-docs-content-type: PROCEDURE
[id="nw-metallb-configure-bgppeer_{context}"]
= Configuring a BGP peer
[role="_abstract"]
To exchange routing information and advertise IP addresses for load balancer services, configure MetalLB BGP peer CRs. Establishing these peers ensures that your network infrastructure can reach and correctly route traffic to cluster application workloads.
You can add a BGP peer custom resource to exchange routing information with network routers and advertise the IP addresses for services.
.Prerequisites
* Install the {oc-first}.
* Log in as a user with `cluster-admin` privileges.
* Configure MetalLB with a BGP advertisement.
.Procedure
. Create a file, such as `bgppeer.yaml`, with content like the following example:
+
[source,yaml]
----
apiVersion: metallb.io/v1beta2
kind: BGPPeer
metadata:
namespace: metallb-system
name: doc-example-peer
spec:
peerAddress: 10.0.0.1
peerASN: 64501
myASN: 64500
routerID: 10.10.10.10
# ...
----
. Apply the BGP peer configuration by entering the following command:
+
[source,terminal]
----
$ oc apply -f bgppeer.yaml
----