In some environments, you’ll have some large address pools of “cheap” private IPs (e.g. RFC1918), and some smaller pools of “expensive” IPs (e.g. leased public IPv4 addresses).
By default, MetalLB will allocate IPs from any configured address pool with free addresses. This might end up using “expensive” addresses for services that don’t require it.
To prevent this behaviour you can disable automatic allocation for a pool
by setting the
autoAssign flag to
apiVersion: metallb.io/v1beta1 kind: IPAddressPool metadata: name: cheap namespace: metallb-system spec: addresses: - 192.168.10.0/24
apiVersion: metallb.io/v1beta1 kind: IPAddressPool metadata: name: expensive namespace: metallb-system spec: addresses: - 126.96.36.199/30 autoAssign: false
Addresses can still be specifically allocated from the “expensive” pool with the methods described in the usage section.
To specify a single IP address in a pool, use
/32 in the CIDR notation
Some old consumer network equipment mistakenly blocks IP addresses
.255, because of
If you encounter this issue with your users or networks, you can
use a range of IPs of the form
192.168.10.1-192.168.10.254 to avoid