mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
33 lines
1.0 KiB
Plaintext
33 lines
1.0 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * /networking/ingress_load_balancing/metallb/metallb-configure-services.adoc
|
|
|
|
:_mod-docs-content-type: REFERENCE
|
|
[id="request-ip-address-from-pool_{context}"]
|
|
= Request an IP address from a specific pool
|
|
|
|
[role="_abstract"]
|
|
To ensure predictable network endpoints, control how MetalLB assigns IP addresses to services of type `LoadBalancer`. Requesting specific addresses or pools ensures that your applications receive valid IP assignments that align with your specific network addressing plan.
|
|
|
|
.Example service YAML for an IP address from a specific pool
|
|
[source,yaml]
|
|
----
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: <service_name>
|
|
annotations:
|
|
metallb.io/address-pool: <address_pool_name>
|
|
spec:
|
|
selector:
|
|
<label_key>: <label_value>
|
|
ports:
|
|
- port: 8080
|
|
targetPort: 8080
|
|
protocol: TCP
|
|
type: LoadBalancer
|
|
----
|
|
|
|
If the address pool that you specify for `<address_pool_name>` does not exist, MetalLB attempts to assign an IP address from any pool that permits automatic assignment.
|
|
|