Request from a specific IP pool¶
When multiple IP addresses are configured to the system, you can request assignment from a specific IP address pool.
Do not use the private IP of the master node to configure IP address pools, as admin function of the MKE web UI will become inaccessible as a result.
metallb.universe.tf/address-poolannotation to the service with the name of the IP address pool as the annotation value:
apiVersion: v1 kind: Service metadata: name: nginx annotations: metallb.universe.tf/address-pool: <IP-address-pool-name> spec: ports: - name: http port: 80 protocol: TCP targetPort: 80 selector: app: nginx type: LoadBalancer
On creation, the service is assigned an external IP address from the indicated IP address pool.
Verify the IP address assignment:
kubectl get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 76m nginx LoadBalancer 10.96.183.55 188.8.131.52 80:35328/TCP 9s