| title | Deploy with Helm | ||
|---|---|---|---|
| description | Install and run LocalStack on Kubernetes using the official Helm chart. | ||
| template | doc | ||
| sidebar |
|
||
| tags |
|
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.
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.
- 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
:::note
Namespace note: All commands in this guide assume installation into the default namespace.
If you’re using a different namespace:
- Add
--namespace <name>(and--create-namespaceon first install) to Helm commands - Add
-n <name>tokubectlcommands :::
helm repo add localstack https://localstack.github.io/helm-charts
helm repo updatehelm install localstack localstack/localstackThis creates the LocalStack resources in your cluster using the chart defaults.
If you want to use the localstack-pro image, create a values.yaml file:
image:
repository: localstack/localstack-pro
extraEnvVars:
- name: LOCALSTACK_AUTH_TOKEN
value: "<your auth token>"Then install using your custom values:
helm install localstack localstack/localstack -f values.yamlIf 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>The chart ships with sensible defaults, but most production setups will want a small values.yaml to customize behavior.
helm show values localstack/localstackCreate a values.yaml and apply it during install/upgrade:
helm upgrade --install localstack localstack/localstack -f values.yamlkubectl get podsAfter a short time, you should see the LocalStack Pod in Running status:
NAME READY STATUS RESTARTS AGE
localstack-7f78c7d9cd-w4ncw 1/1 Running 0 1m9s
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"
}If you want state to survive Pod restarts, enable PVC-backed persistence:
- Set:
persistence.enabled = true
Example values.yaml:
persistence:
enabled: true:::note This is especially useful for workflows where you seed resources or rely on state across restarts. :::
Some environments (notably EKS on Fargate) may terminate the LocalStack pod if not configured with reasonable requests/limits:
resources:
requests:
cpu: 1
memory: 1Gi
limits:
cpu: 2
memory: 2GiYou 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 hereUse --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 localstackhelm repo update
helm upgrade localstack localstack/localstackIf you use a values.yaml:
helm upgrade localstack localstack/localstack -f values.yamlRun:
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).