How To Add/Modify Existing MetalLB Configuration via API
Problem
How To Add/Modify Existing MetalLB Configuration via API on a PMK cluster?
Environment
Platform9 Managed Kubernetes
AddOn Operator v4.0.0 & MetalLB v0.9.7 and Above
Procedure
Verify the pf9-addon-operator version on the cluster.
# kubectl describe deployment pf9-addon-operator -n pf9-addons | grep -i image
Image: platform9/pf9-addon-operator:5.0.0Fetch the authentication TOKEN. Keystone Identity API: This link describes the process for getting a Keystone authentication token in order to access the PMK REST API.
API to retrieve currently set MetalLB ClusterAddon object details.
curl -X GET -H "X-Auth-Token: $TOKEN" https://<DU_FQDN>/qbert/v4/<PROJECT_ID>/sunpike/apis/sunpike.platform9.com/v1alpha2/namespaces/default/clusteraddons/<CLUSTER_UUID>-metallbMetalLB ClusterAddon object here with single address pool range.
Related Existing ConfigMap.
Create a new JSON spec for MetalLB.
translates to
Patching the existing MetalLB ClusterAddon object with the above-mentioned new JSON spec metallbaddon.json.
Updated MetalLB ClusterAddon object
ConfigMap Updated After the PATCH Request.
Additional Information
Within PMK, currently while creating a cluster you can provide multiple address pools for MetalLB. *Reference: *Create a cluster using auto-deploy or manual mode
Last updated
