MetalLB Kubernetes Addon Module
Terraform module to deploy MetalLB load balancer on a Kubernetes cluster.
provider "helm" {
kubernetes {
config_path = " ./kubeconfig"
}
}
provider "kubectl" {
config_path = " ./kubeconfig"
}
module "metallb" {
source = " freed-dev-llc/metallb/kubernetes"
version = " >= 1.3.0"
ip_range = " 192.168.1.200-192.168.1.220"
}
Name
Description
Type
Default
Required
ip_range
IP range for LoadBalancer services (e.g., 192.168.1.200-192.168.1.220)
string
n/a
yes
chart_version
MetalLB Helm chart version
string
"0.14.9"
no
controller_resources
Resource requests/limits for MetalLB controller
object({ requests = optional(object({ cpu = optional(string, "100m") memory = optional(string, "128Mi") }), {}) limits = optional(object({ cpu = optional(string, "200m") memory = optional(string, "256Mi") }), {}) })
{}
no
namespace
Kubernetes namespace for MetalLB
string
"metallb-system"
no
pool_name
Name of the IP address pool
string
"default-pool"
no
privileged_namespace
Apply privileged PodSecurity labels to namespace (required for Talos Linux)
bool
true
no
speaker_resources
Resource requests/limits for MetalLB speaker
object({ requests = optional(object({ cpu = optional(string, "100m") memory = optional(string, "128Mi") }), {}) limits = optional(object({ cpu = optional(string, "200m") memory = optional(string, "256Mi") }), {}) })
{}
no
timeout
Helm install timeout in seconds
number
300
no
This module requires the helm and kubectl providers to be configured with access to your Kubernetes cluster:
provider "helm" {
kubernetes {
config_path = " ./kubeconfig"
}
}
provider "kubectl" {
config_path = " ./kubeconfig"
}
Apache 2.0 - See LICENSE for details.