bitnamicharts/metallb
Bitnami Helm chart for MetalLB
100K+
MetalLB is a load-balancer implementation for bare metal Kubernetes clusters, using standard routing protocols.
Trademarks: This software listing is packaged by Bitnami. The respective trademarks mentioned in the offering are owned by the respective companies, and use of them does not imply any affiliation or endorsement.
helm install my-release oci://registry-1.docker.io/bitnamicharts/metallb
Looking to use MetalLB in production? Try VMware Tanzu Application Catalog, the commercial edition of the Bitnami catalog.
Bitnami charts for Helm are carefully engineered, actively maintained and are the quickest and easiest way to deploy containers on a Kubernetes cluster that are ready to handle production workloads.
This chart bootstraps a MetalLB Controller Controller Deployment and a MetalLB Speaker Daemonset on a Kubernetes cluster using the Helm package manager.
Bitnami charts can be used with Kubeapps for deployment and management of Helm Charts in clusters.
To install the chart with the release name my-release
:
helm install my-release oci://REGISTRY_NAME/REPOSITORY_NAME/metallb
Note: You need to substitute the placeholders
REGISTRY_NAME
andREPOSITORY_NAME
with a reference to your Helm chart registry and repository. For example, in the case of Bitnami, you need to useREGISTRY_NAME=registry-1.docker.io
andREPOSITORY_NAME=bitnamicharts
.
These commands deploy metallb on the Kubernetes cluster in the default configuration. The Parameters section lists the parameters that can be configured during installation.
Tip: List all releases using
helm list
Bitnami charts allow setting resource requests and limits for all containers inside the chart deployment. These are inside the resources
value (check parameter table). Setting requests is essential for production workloads and these should be adapted to your specific use case.
To make this process easier, the chart contains the resourcesPreset
values, which automatically sets the resources
section according to different presets. Check these presets in the bitnami/common chart. However, in production workloads using resourcesPreset
is discouraged as it may not fully adapt to your specific needs. Find more information on container resource management in the official Kubernetes documentation.
This chart can be integrated with Prometheus by setting *.metrics.enabled
(under the controller
, speaker
and speaker.frr
sections) to true. This will expose the MetalLB native Prometheus port in both the containers and services. The services will also have the necessary annotations to be automatically scraped by Prometheus.
Prometheus requirements
It is necessary to have a working installation of Prometheus or Prometheus Operator for the integration to work. Install the Bitnami Prometheus helm chart or the Bitnami Kube Prometheus helm chart to easily have a working Prometheus in your cluster.
Integration with Prometheus Operator
The chart can deploy ServiceMonitor
objects for integration with Prometheus Operator installations. To do so, set the value *.metrics.serviceMonitor.enabled=true
(under the controller
, speaker
and speaker.frr
sections). Ensure that the Prometheus Operator CustomResourceDefinitions
are installed in the cluster or it will fail with the following error:
no matches for kind "ServiceMonitor" in version "monitoring.coreos.com/v1"
Install the Bitnami Kube Prometheus helm chart for having the necessary CRDs and the Prometheus Operator.
It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image.
Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist.
To configure MetalLB please look into the configuration section MetalLB Configuration.
To back up and restore Helm chart deployments on Kubernetes, you need to back up the persistent volumes from the source deployment and attach them to a new deployment using Velero, a Kubernetes backup/restore tool. Find the instructions for using Velero in this guide.
# The address-pools lists the IP addresses that MetalLB is
# allowed to allocate. You can have as many
# address pools as you want.
apiVersion: metallb.io/v1beta1
kind: IPAddressPool
metadata:
# A name for the address pool. Services can request allocation
# from a specific address pool using this name.
name: first-pool
namespace: metallb-system
spec:
# A list of IP address ranges over which MetalLB has
# authority. You can list multiple ranges in a single pool, they
# will all share the same settings. Each range can be either a
# CIDR prefix, or an explicit start-end range of IPs.
addresses:
- 192.168.10.0/24
- 192.168.9.1-192.168.9.5
- fc00:f853:0ccd:e799::/124
Name | Description | Value |
---|---|---|
global.imageRegistry | Global Docker image registry | "" |
global.imagePullSecrets | Global Docker registry secret names as an array | [] |
global.security.allowInsecureImages | Allows skipping image verification | false |
global.compatibility.openshift.adaptSecurityContext | Adapt the securityContext sections of the deployment to make them compatible with Openshift restricted-v2 SCC: remove runAsUser, runAsGroup and fsGroup and let the platform use their allowed default IDs. Possible values: auto (apply if the detected running cluster is Openshift), force (perform the adaptation always), disabled (do not perform adaptation) | auto |
Name | Description | Value |
---|---|---|
kubeVersion | Force target Kubernetes version (using Helm capabilities if not set) | "" |
nameOverride | String to partially override metallb.fullname include (will maintain the release name) | "" |
fullnameOverride | String to fully override metallb.fullname template | "" |
commonLabels | Add labels to all the deployed resources | {} |
commonAnnotations | Add annotations to all the deployed resources | {} |
extraDeploy | Array of extra objects to deploy with the release | [] |
diagnosticMode.enabled | Enable diagnostic mode (all probes will be disabled and the command will be overridden) | false |
diagnosticMode.command | Command to override all containers in the the deployment(s)/statefulset(s) | ["sleep"] |
diagnosticMode.args | Args to override all containers in the the deployment(s)/statefulset(s) | ["infinity"] |
installCRDs | Flag to install metallb CRDs | true |
Name | Description | Value |
---|---|---|
rbac.create | Specifies whether to install and use RBAC rules | true |
psp.create | Whether to create a PodSecurityPolicy. WARNING: PodSecurityPolicy is deprecated in Kubernetes v1.21 or later, unavailable in v1.25 or later | false |
networkPolicy.enabled | Enable creation of NetworkPolicy resources | true |
networkPolicy.allowExternal | The Policy model to apply | true |
networkPolicy.allowExternalEgress | Allow the pod to access any range of port and all destinations. | true |
networkPolicy.kubeAPIServerPorts | List of possible endpoints to kube-apiserver (limit to your cluster settings to increase security) | [] |
networkPolicy.extraIngress | Add extra ingress rules to the NetworkPolicy | [] |
networkPolicy.extraEgress | Add extra ingress rules to the NetworkPolicy | [] |
networkPolicy.ingressNSMatchLabels | Labels to match to allow traffic from other namespaces | {} |
networkPolicy.ingressNSPodMatchLabels | Pod labels to match to allow traffic from other namespaces | {} |
prometheusRule.enabled | Prometheus Operator alertmanager alerts are created | false |
Name | Description | Value |
---|---|---|
controller.image.registry | MetalLB Controller image registry | REGISTRY_NAME |
controller.image.repository | MetalLB Controller image repository | REPOSITORY_NAME/metallb-controller |
controller.image.digest | MetalLB Controller image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag | "" |
controller.image.pullPolicy | MetalLB Controller image pull policy | IfNotPresent |
controller.image.pullSecrets | Specify docker-registry secret names as an array | [] |
controller.updateStrategy.type | MetalLB controller deployment strategy type. | RollingUpdate |
controller.automountServiceAccountToken | Mount Service Account token in pod | true |
controller.hostAliases | Deployment pod host aliases | [] |
controller.rbac.create | create specifies whether to install and use RBAC rules. | true |
controller.psp.create | Whether to create a PodSecurityPolicy. WARNING: PodSecurityPolicy is deprecated in Kubernetes v1.21 or later, unavailable in v1.25 or later | true |
controller.priorityClassName | MetalLB controller pods' priorityClassName | "" |
controller.runtimeClassName | Name of the runtime class to be used by MetalLB controller pod(s) | "" |
controller.schedulerName | Name of the k8s scheduler (other than default) | "" |
controller.terminationGracePeriodSeconds | In seconds, time the given to the MetalLB controller pod needs to terminate gracefully | 0 |
controller.topologySpreadConstraints | Topology Spread Constraints for pod assignment | [] |
controller.resourcesPreset | Set container resources according to one common preset (allowed values: none, nano, micro, small, medium, large, xlarge, 2xlarge). This is ignored if controller.resources is set (controller.resources is recommended for production). | nano |
controller.resources | Set container requests and limits for different resources like CPU or memory (essential for production workloads) | {} |
controller.nodeSelector | Node labels for controller pod assignment | {} |
controller.tolerations | Tolerations for controller pod assignment | [] |
controller.affinity | Affinity for controller pod assignment | {} |
controller.podAnnotations | Controller Pod annotations | {} |
controller.podLabels | Controller Pod labels | {} |
controller.podAffinityPreset | Controller Pod affinitypreset. Allowed values: soft, hard | "" |
controller.podAntiAffinityPreset | Controller Pod anti affinitypreset. Allowed values: soft, hard | soft |
controller.nodeAffinityPreset.type | Controller Pod Node affinity preset. Allowed values: soft, hard | "" |
controller.nodeAffinityPreset.key | Controller Pod Node affinity label key to match | "" |
controller.nodeAffinityPreset.values | Controller Pod Node affinity label values to match | [] |
controller.podSecurityContext.enabled | Enabled MetalLB Controller pods' Security Context | true |
controller.podSecurityContext.fsGroupChangePolicy | Set filesystem group change policy | Always |
controller.podSecurityContext.sysctls | Set kernel settings using the sysctl interface | [] |
controller.podSecurityContext.supplementalGroups | Set filesystem extra groups | [] |
controller.podSecurityContext.fsGroup | Set MetalLB Controller pod's Security Context fsGroup |
Note: the README for this chart is longer than the DockerHub length limit of 25000, so it has been trimmed. The full README can be found at https://github.com/bitnami/charts/blob/main/bitnami/metallb/README.md