Deploy with Helm
Introduction
Section titled “Introduction”A Helm chart is a package that bundles Kubernetes manifests into a reusable, configurable deployment unit. It makes applications easier to install, upgrade, and manage.
Using the LocalStack Helm chart lets you deploy LocalStack to Kubernetes with set defaults while still customizing resources, persistence, networking, and environment variables through a single values.yaml. This approach is especially useful for teams running LocalStack in shared clusters or CI environments where repeatable, versioned deployments matter.
Getting Started
Section titled “Getting Started”This guide shows you how to install and run LocalStack on Kubernetes using the official Helm chart. It walks you through adding the Helm repository, installing and configuring LocalStack, and verifying that your deployment is running and accessible in your cluster.
Prerequisites
Section titled “Prerequisites”- Kubernetes 1.19 or newer
- Helm 3.2.0 or newer
- A working Kubernetes cluster (self-hosted, managed, or local)
kubectlinstalled and configured for your cluster- Helm CLI installed and available in your shell
PATH
Install
Section titled “Install”1) Add Helm repo
Section titled “1) Add Helm repo”helm repo add localstack https://localstack.github.io/helm-chartshelm repo update2) Install with default configuration
Section titled “2) Install with default configuration”helm install localstack localstack/localstackThis creates the LocalStack resources in your cluster using the chart defaults.
Auth token from a Kubernetes Secret
Section titled “Auth token from a Kubernetes Secret”If your auth token is stored in a Kubernetes Secret, you can reference it using valueFrom:
extraEnvVars: - name: LOCALSTACK_AUTH_TOKEN valueFrom: secretKeyRef: name: <name of the secret> key: <name of the key in the secret containing the API key>Configure
Section titled “Configure”The chart ships with sensible defaults, but most production-ish setups will want a small values.yaml to customize behavior.
View all default values
Section titled “View all default values”helm show values localstack/localstackOverride values with a custom values.yaml
Section titled “Override values with a custom values.yaml”Create a values.yaml and apply it during install/upgrade:
helm upgrade --install localstack localstack/localstack -f values.yamlVerify
Section titled “Verify”1) Check the Pod status
Section titled “1) Check the Pod status”kubectl get podsAfter a short time, you should see the LocalStack Pod in Running status:
NAME READY STATUS RESTARTS AGElocalstack-7f78c7d9cd-w4ncw 1/1 Running 0 1m9s2) Optional: Port-forward to access LocalStack from localhost
Section titled “2) Optional: Port-forward to access LocalStack from localhost”If you’re running a local cluster (for example, k3d) and LocalStack is not exposed externally, port-forward the service:
kubectl port-forward svc/localstack 4566:4566Now verify connectivity with the AWS CLI:
aws sts get-caller-identity --endpoint-url "http://0.0.0.0:4566"Example response:
{ "UserId": "AKIAIOSFODNN7EXAMPLE", "Account": "000000000000", "Arn": "arn:aws:iam::000000000000:root"}Common customizations
Section titled “Common customizations”Enable persistence
Section titled “Enable persistence”If you want state to survive Pod restarts, enable PVC-backed persistence:
- Set:
persistence.enabled = true
Example values.yaml:
persistence: enabled: trueSet Pod resource requests and limits
Section titled “Set Pod resource requests and limits”Some environments (notably EKS on Fargate) may terminate Pods with low/default resource allocations. Consider setting explicit requests/limits:
resources: requests: cpu: 1 memory: 1Gi limits: cpu: 2 memory: 2GiAdd env vars and startup scripts
Section titled “Add env vars and startup scripts”You can inject environment variables or run a startup script to:
- pre-configure LocalStack
- seed AWS resources
- tweak LocalStack behavior
Use:
extraEnvVarsfor environment variablesstartupScriptContentfor startup scripts
Example pattern:
extraEnvVars: - name: DEBUG value: "1"
startupScriptContent: | echo "Starting up..." # add your initialization logic hereInstall into a different namespace
Section titled “Install into a different namespace”Use --namespace and create it on first install:
helm install localstack localstack/localstack --namespace localstack --create-namespaceThen include the namespace on kubectl commands:
kubectl get pods -n localstackUpdate installation
Section titled “Update installation”helm repo updatehelm upgrade localstack localstack/localstackIf you use a values.yaml:
helm upgrade localstack localstack/localstack -f values.yamlHelm chart options
Section titled “Helm chart options”Run:
helm show values localstack/localstackKeep the parameter tables on this page for quick reference (especially for common settings like persistence, resources, env vars, and service exposure).