Execute block runs in separate pods.
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.
There’re three ways to customize the Kubernetes executor config:
executor_config
at block level in pipeline’s metadata.yaml file. Example config:
k8s_executor_config
to project’s metadata.yaml. This k8s_executor_config
will apply to all the blocks that use k8s executor
in this project. Example config:
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_executor_config
like
container_config
or job
in the k8s executor config. Here is the example:
K8S_CONFIG_FILE
environment variable, which should point to the configuration file. Here is the format for the Kubernetes configuration template:MAGE_CONTAINER_NAME
. If this variable is not set, Mage will default to using the first container in the pod. To specify the Mage container, you can use: