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-advertise-address-pool-with-bgp.adoc

68 lines
1.7 KiB
Plaintext

// Module included in the following assemblies:
//
// * networking/metallb/about-advertising-ipaddresspool.adoc
:_mod-docs-content-type: PROCEDURE
[id="nw-metallb-advertise-a-basic-address-pool-configuration-bgp_{context}"]
= Advertising a basic address pool configuration with BGP
[role="_abstract"]
To ensure application services are reachable from external network peers, configure MetalLB to advertise an `IPAddressPool` by using the BGP advertisement. Establishing this advertisement allows the external network to correctly route traffic to the load balancer IP addresses of your cluster services.
The procedure demonstrates how to configure MetalLB to advertise the `IPAddressPool` by using BGP.
.Prerequisites
* Install the {oc-first}.
* Log in as a user with `cluster-admin` privileges.
.Procedure
. Create an IP address pool.
+
.. Create a file, such as `ipaddresspool.yaml`, with content like the following example:
+
[source,yaml]
----
apiVersion: metallb.io/v1beta1
kind: IPAddressPool
metadata:
namespace: metallb-system
name: doc-example-bgp-basic
spec:
addresses:
- 203.0.113.200/30
- fc00:f853:ccd:e799::/124
# ...
----
+
.. Apply the configuration for the IP address pool:
+
[source,terminal]
----
$ oc apply -f ipaddresspool.yaml
----
. Create a BGP advertisement.
+
.. Create a file, such as `bgpadvertisement.yaml`, with content like the following example:
+
[source,yaml]
----
apiVersion: metallb.io/v1beta1
kind: BGPAdvertisement
metadata:
name: bgpadvertisement-basic
namespace: metallb-system
spec:
ipAddressPools:
- doc-example-bgp-basic
# ...
----
+
.. Apply the configuration:
+
[source,terminal]
----
$ oc apply -f bgpadvertisement.yaml
----