|
| 1 | +[id="nw-metallb-addresspool-cr_{context}"] |
| 2 | += About the address pool custom resource |
| 3 | + |
| 4 | +The fields for the address pool custom resource are described in the following table. |
| 5 | + |
| 6 | +.MetalLB address pool custom resource |
| 7 | +[cols="1,1,3", options="header"] |
| 8 | +|=== |
| 9 | + |
| 10 | +|Field |
| 11 | +|Type |
| 12 | +|Description |
| 13 | + |
| 14 | +|`metadata.name` |
| 15 | +|`string` |
| 16 | +|Specifies the name for the address pool. |
| 17 | +When you add a service, you can specify this pool name in the `metallb.universe.tf/address-pool` annotation to select an IP address from a specific pool. |
| 18 | +The names `doc-example`, `silver`, and `gold` are used throughout the documentation. |
| 19 | + |
| 20 | +|`metadata.namespace` |
| 21 | +|`string` |
| 22 | +|Specifies the namespace for the address pool. |
| 23 | +Specify the same namespace that the MetalLB Operator uses. |
| 24 | + |
| 25 | +|`spec.protocol` |
| 26 | +|`string` |
| 27 | +|Specifies the protocol for announcing the load balancer IP address to peer nodes. |
| 28 | +The only supported value is `layer2`. |
| 29 | + |
| 30 | +|`spec.autoAssign` |
| 31 | +|`boolean` |
| 32 | +|Optional: Specifies whether MetalLB automatically assigns IP addresses from this pool. |
| 33 | +Specify `false` if you want explicitly request an IP address from this pool with the `metallb.universe.tf/address-pool` annotation. |
| 34 | +The default value is `true`. |
| 35 | + |
| 36 | +|`spec.addresses` |
| 37 | +|`array` |
| 38 | +|Specifies a list of IP addresses for MetalLB to assign to services. |
| 39 | +You can specify multiple ranges in a single pool. |
| 40 | +Specify each range in CIDR notation or as starting and ending IP addresses separated with a hyphen. |
| 41 | + |
| 42 | +|=== |
| 43 | + |
| 44 | +//// |
| 45 | +.Address pool object |
| 46 | +[source,yaml] |
| 47 | +---- |
| 48 | +apiVersion: metallb.io/v1alpha1 |
| 49 | +kind: AddressPool |
| 50 | +metadata: |
| 51 | + name: <pool_name> <.> |
| 52 | + namespace: metallb-system <.> |
| 53 | +spec: |
| 54 | + protocol: <protocol_type> <.> |
| 55 | + autoAssign: true <.> |
| 56 | + addresses: <.> |
| 57 | + - <range_or_CIDR> |
| 58 | + ... |
| 59 | +---- |
| 60 | +<.> Specify the name for the address pool. When you add a service, you can specify this pool name in the `metallb.universe.tf/address-pool` annotation to select an IP address from a specific pool. |
| 61 | +
|
| 62 | +<.> Specify the namespace for the address pool. |
| 63 | +
|
| 64 | +<.> Specify the protocol for announcing the load balancer IP address to peer nodes. The only supported value is `layer2`. |
| 65 | +
|
| 66 | +<.> Optional: Specify whether MetalLB automatically assigns IP addresses from this pool. Specify `false` if you want explicitly request an IP address from this pool with the `metallb.universe.tf/address-pool` annotation. The default value is `true`. |
| 67 | +
|
| 68 | +<.> Specify a list of IP addresses for MetalLB to assign to services. You can specify multiple ranges in a single pool. Specify each range in CIDR notation or as starting and ending IP addresses separated with a hyphen. |
| 69 | +//// |
0 commit comments