values.yaml to customize deployment topology, dependencies, storage, and Mage Pro features.
Prerequisites
Install Helm
Setup a Kubernetes Cluster
Local
Enable Kubernetes in Docker Desktop to start a Kubernetes cluster locally. Other options for starting a Kubernetes cluster locally:AWS EKS
Follow the guide to set up the EKS cluster.Google Kubernetes Engine (GKE)
Follow the guide to create a GKE cluster.Deploy Mage using Helm
Mage Helm repo: https://mage-ai.github.io/helm-charts/Add Helm repository
Install with default config
Get the default values
To customize the deployment, save the chart’s default values and edit them:Customize deployment
The chart supports many options. Key areas are summarized below; for the full reference, see the Mage Helm Chart — Values Reference in the chart repository.Deployment topology
replicaCount— Number of Mage replicas (default:1). Increase for high availability or more concurrent requests and pipeline runs. When using multiple replicas, you must enable Redis (see Dependencies).standaloneScheduler— Whentrue, splits Mage into separate web server and scheduler deployments so you can scale and schedule them independently. Usescheduler.replicaCountandwebServer.replicaCountinstead ofreplicaCountwhen enabled.
Dependencies
- PostgreSQL (
postgresql.enabled) — Required for production: pipelines, triggers, and metadata. Enable and setauth.username,auth.password, andauth.database(or use an external database and configure Mage accordingly). - Redis (
redis.enabled) — Required whenreplicaCount> 1, for distributed locking and caching. You can use an external Redis by settingcustomRedisURLand leavingredis.enabled: false.
Container image
image.repository,image.tag,image.pullPolicy— Control which Mage image is used (default repository:mageai/mageai).imagePullSecrets— Use for private registries or Mage Pro registry; the secret must exist in the target namespace.
Storage and volumes
Project code must be available at/home/src inside the container. You can provide it in two ways:
-
extraVolumes/extraVolumeMounts(default) — The chart typically mounts a volume namedmage-fsat/home/src. Point it to your project:- Local / hostPath: set
extraVolumesto ahostPathwith your Mage project path. - Cloud (EKS, GKE, AKS): provision a ReadWriteMany PersistentVolume (e.g. EFS, Filestore, Azure Files) and a PersistentVolumeClaim, then use that claim in
extraVolumes/extraVolumeMounts.
- Local / hostPath: set
-
persistence.enabled: true— Use the chart’s built-in PersistentVolume. Setpersistence.storageClassNameandpersistence.size(e.g.5Gi). For cloud filesystems (e.g. EFS), you can usepersistence.csiif supported by the chart.
Example: PVC for project code (EKS / GKE / Azure)
After creating a ReadWriteMany PVC (e.g. EKS EFS PVC, GKE Filestore, or AKS storage):Service and ingress
service.type— Default isLoadBalancer; set toClusterIPorNodePortif needed.service.portdefaults to6789.service.annotations— Use for cloud load balancers (e.g. AWS NLB, GCP).ingress— Setingress.enabled: trueand configureingress.className,ingress.hosts, andingress.tlsfor external access. For production, consider the Mage-Ingress chart.
Environment and configuration
config— Key-value environment variables for the Mage container (e.g.USER_CODE_PATH: /home/src/default_repo).secrets— Chart-created secrets injected as env vars. Prefer a secret manager (e.g. Vault, AWS Secrets Manager) in production.existingSecret— Use an existing Secret for env vars; takes precedence oversecretsif both are set.extraEnvs— Additional env vars, includingvalueFrom(e.g. downward API formetadata.namespace).
Resources and scheduling
resources— Set CPU/memorylimitsandrequestsfor the Mage container.nodeSelector,tolerations,affinity— Control pod placement.livenessProbe/readinessProbe— Default to/api/statuson the http port; customize or replace withcustomLivenessProbe/customReadinessProbe.hpa— Horizontal Pod Autoscaler (commented out by default).
Quick reference: common overrides
| Use case | Key values |
|---|---|
| Production with database | postgresql.enabled: true, redis.enabled: true |
| Multiple replicas | replicaCount: 2, redis.enabled: true |
| Private registry | image.repository, imagePullSecrets |
| Custom persistent volume | extraVolumes / extraVolumeMounts with your path or PVC |
| Persistent storage | persistence.enabled: true, persistence.storageClassName, persistence.size |
| Mage Pro workspaces | workspaceConfig.enabled: true |
| Mage Pro K8s executor | k8sExecutorConfig.enabled: true |
Default workspace and K8s executor config
The workspaceConfig and k8sExecutorConfig options in the Helm chart are supported only in Mage Pro. They are ignored when running Mage OSS.
workspaceConfig— Default workspace configuration (e.g.container_config,service_account_name,lifecycle_config). The chart creates a ConfigMap, mounts it on the control plane at/etc/mage/workspace-config.yaml, and setsWORKSPACE_DEFAULT_CONFIG_PATH. See Workspaces — Default config file.k8sExecutorConfig— Default K8s executor configuration (e.g.resource_limits,resource_requests,pod). The chart creates a ConfigMap, mounts it at/etc/mage/k8s-executor-config.yaml, and setsK8S_DEFAULT_CONFIG_PATH. See K8s executor — Default config file.
enforce as needed in values.yaml; do not set WORKSPACE_DEFAULT_CONFIG_PATH or K8S_DEFAULT_CONFIG_PATH manually when using these chart options.
Further reading
- Mage Helm Chart source and values — full values reference in the chart repo
- Helm chart releases
- Mage Pro Workspaces
- Kubernetes Executor