Run Mage pipeline blocks in separate Kubernetes pods for scalability, isolation, and resource control.
executor_type: k8s
) to run each block in its own Kubernetes pod.
Defaults in Mage Pro:
default
mage-data-prep-block-{block_run_id}
executor_type
of the block to k8s
in pipeline’s metadata.yaml:
default
as the Kubernetes namespace. You can customize the namespace by setting the KUBE_NAMESPACE
environment variable.
executor_config
to a block in metadata.yaml
:
k8s_executor_config
in the project’s metadata.yaml:
mage-{job_name_prefix}-block-{block_run_id}
.
The default job_name_prefix
is data-prep
.
You can customize it in the k8s_executor_config
.
You can interpolate the trigger name in the job_name_prefix
field with the format {trigger_name}
.K8S_CONFIG_FILE
environment variable to the path of a YAML configuration file.
Example template:
MAGE_CONTAINER_NAME
environment variable to specify which container runs Mage:
Variable | Purpose | Default |
---|---|---|
KUBE_NAMESPACE | Namespace for job execution | default |
K8S_CONFIG_FILE | Path to full Kubernetes job config file | — |
MAGE_CONTAINER_NAME | Container to run Mage in multi-container pods | — |