In Cloudera Workflow Orchestrator , tasks execute inside isolated Kubernetes
worker pods. By default, these pods are assigned standard resource limits. To optimize
pipeline performance and prevent memory or CPU bottlenecks, you can override these defaults
at either the task level or the DAG level using the executor_config
dictionary.
By default, worker pods execute with the following standard resource
specifications:
Requests : 100m CPU and 1 GB of RAM.
Limits : Unrestricted CPU and a strict limit of 1
GB of RAM.
important
Clusters with base cluster connectivity include a kinit sidecar container
with 100m vCPU and 256 MiB of RAM.
You can specify partial resource overrides, such as only a memory limit, and
default values will populate the remaining resource fields.
Identify the CPU and memory requirements for your workload. Resources are
defined using standard Kubernetes syntax:
CPU : Specified in cores (example, 1) or
millicores (example, 500m).
Memory : Specified in bytes, Ki, Mi, Gi,
and so on. (example, 2Gi).
note
Make sure the target Kubernetes namespace has
sufficient resource quota available to schedule the specified pod
requests.
Open the DAG file.
Define the worker pod resources in the DAG file.
Example,
config_resource_requirements = {
"pod_override": k8s.V1Pod(
spec=k8s.V1PodSpec(
containers=[
k8s.V1Container(
name="base",
resources=k8s.V1ResourceRequirements(
requests={"cpu": "200m", "memory": "1024Mi"},
limits={"cpu": "200m", "memory": "1024Mi"},
),
)
]
)
)
}
Configure the worker pod resources for a specific task or across the DAG file
for all the tasks. Perform one of the following steps:
Configure the worker pod resources for a specific task using the
executor_config dictionary in that
task.Example,
from airflow import DAG
from airflow.operators.bash import BashOperator
from kubernetes.client import models as k8s
from pendulum import datetime
config_resource_requirements = {
"pod_override": k8s.V1Pod(
spec=k8s.V1PodSpec(
containers=[
k8s.V1Container(
name="base",
resources=k8s.V1ResourceRequirements(
requests={"cpu": "200m", "memory": "1024Mi"},
limits={"cpu": "200m", "memory": "1024Mi"},
),
)
]
)
)
}
with DAG(
dag_id="worker_resources_override",
start_date=datetime(2026, 1, 1),
schedule=None,
catchup=False,
):
BashOperator(
task_id="whoami",
bash_command="whoami",
executor_config=config_resource_requirements,
)
Configure the worker pod resources in the DAG globally for all the tasks
using the executor_config
dictionary.Example,
from airflow import DAG
from airflow.operators.bash import BashOperator
from kubernetes.client import models as k8s
from pendulum import datetime
config_resource_requirements = {
"pod_override": k8s.V1Pod(
spec=k8s.V1PodSpec(
containers=[
k8s.V1Container(
name="base",
resources=k8s.V1ResourceRequirements(
requests={"cpu": "200m", "memory": "1024Mi"},
limits={"cpu": "200m", "memory": "1024Mi"},
),
)
]
)
)
}
with DAG(
dag_id="worker_resources_override",
start_date=datetime(2026, 1, 1),
schedule=None,
catchup=False,
default_args={"executor_config": config_resource_requirements},
) as dag:
Deploy the DAG and monitor the worker pods to make sure that they are
initialized with the requested resource limits and requests.