Metallb Docker Image
Bitnami提供的Helm Chart,用于在Kubernetes集群部署MetalLB——裸金属K8s集群的负载均衡器实现,支持标准路由协议。
Bitnami Secure Images Helm chart for MetalLB
MetalLB is a load-*** implementation for bare metal Kubernetes clusters, using standard routing protocols.
Overview of MetalLB
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.
TL;DR
consolehelm install my-release oci://REGISTRY_NAME/REPOSITORY_NAME/metallb
Note: You need to substitute the placeholders
REGISTRY_NAMEandREPOSITORY_NAMEwith a reference to your Helm chart registry and repository.
Introduction
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 https://kubernetes.io cluster using the https://helm.sh package manager.
Before you begin
- Kubernetes 1.23+
- Helm 3.8.0+
- Virtual IPs for Layer 2 or Route Reflector for BGP setup.
Installing the Chart
To install the chart with the release name my-release:
consolehelm install my-release oci://REGISTRY_NAME/REPOSITORY_NAME/metallb
Note: You need to substitute the placeholders
REGISTRY_NAMEandREPOSITORY_NAMEwith a reference to your Helm chart registry and repository. For example, in the case of Bitnami, you need to useREGISTRY_NAME=registry-1.docker.ioandREPOSITORY_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
Configuration and installation details
This section describes credentials, configuration, and other installation options.
Resource requests and limits
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 https://github.com/bitnami/charts/blob/main/bitnami/common/templates/_resources.tpl#L15. 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 https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/.
Prometheus metrics
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 https://github.com/bitnami/charts/tree/main/bitnami/prometheus or the https://github.com/bitnami/charts/tree/main/bitnami/kube-prometheus 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:
textno matches for kind "ServiceMonitor" in version "monitoring.coreos.com/v1"
Install the https://github.com/bitnami/charts/tree/main/bitnami/kube-prometheus for having the necessary CRDs and the Prometheus Operator.
https://techdocs.broadcom.com/us/en/vmware-tanzu/bitnami-secure-images/bitnami-secure-images/services/bsi-doc/apps-tutorials-understand-rolling-tags-containers-index.html
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.
Backup and restore
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 https://velero.io/, a Kubernetes backup/restore tool. Find the instructions for using Velero in https://techdocs.broadcom.com/us/en/vmware-tanzu/bitnami-secure-images/bitnami-secure-images/services/bsi-doc/apps-tutorials-backup-restore-deployments-velero-index.html.
Example IP addresses to assing to the Load*** configuration
yaml# 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
FIPS parameters
The FIPS parameters only have effect if you are using images from the https://go-vmware.broadcom.com/contact-us.
For more information on this new support, please refer to the https://techdocs.broadcom.com/us/en/vmware-tanzu/bitnami-secure-images/bitnami-secure-images/services/bsi-doc/security-frameworks-FIPS-compliance.html.
Parameters
The following subsections list global, common, and component-specific parameters.
Global parameters
| Name | Description | Value |
|---|---|---|
global.imageRegistry | Global Docker image registry | "" |
global.imagePullSecrets | Global Docker registry secret names as an array | [] |
global.defaultFips | Default value for the FIPS configuration (allowed values: '', restricted, relaxed, off). Can be overridden by the 'fips' object | restricted |
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 |
Common parameters
| 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 |
existingConfigMap | Specify an existing ConfigMap to use (will ignore configInline) | "" |
configInline | Specify the config for metallb as a string | "" |
MetalLB parameters
| 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 |
Controller parameters
| 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.fips.openssl | Configure OpenSSL FIPS mode: '', 'restricted', 'relaxed', 'off'. If empty (""), 'global.defaultFips' would be used | "" |
controller.fips.golang | Configure Golang FIPS mode: '', 'restricted', 'relaxed', 'off'. If empty (""), 'global.defaultFips' would be used | relaxed |
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. Allo |
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://techdocs.broadcom.com/us/en/vmware-tanzu/bitnami-secure-images/bitnami-secure-images/services/bsi-app-doc/apps-charts-metallb-index.html
bitnamicharts 命名空间的其他可用镜像:
bitnamicharts/mysql
bitnamicharts/kafka
bitnamicharts/etcd
bitnamicharts/postgresql
bitnamicharts/harbor
bitnamicharts/milvus
镜像拉取方式
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
轩辕镜像加速拉取命令点我查看更多 metallb 镜像标签
DockerHub 原生拉取命令
用户好评
来自真实用户的反馈,见证轩辕镜像的优质服务