Configure Airflow KubernetesExecutor with pod templates and per-task pod overrides for resource isolation

domain: airflow.apache.org · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Set executor = KubernetesExecutor in airflow.cfg and provide a pod_template_file pointing to a base Kubernetes Pod manifest YAML
  2. Define default resource requests/limits in the base pod template; Kubernetes will apply these to every task pod
  3. Override resources for specific tasks using the executor_config parameter on the operator: executor_config={'KubernetesExecutor': {'request_memory': '2Gi', 'limit_cpu': '1'}}
  4. Mount secrets and ConfigMaps in the pod template or per-task executor_config to supply environment variables and credentials without baking them into images
  5. Configure pod_template_file namespace, service account, and image pull policy; ensure the Airflow worker service account has the RBAC permissions to create and delete pods
  6. Use Airflow's built-in pod log streaming to retrieve task logs from ephemeral Kubernetes pods before they are deleted

Known gotchas

Related routes

Configure a PodDisruptionBudget to protect a workload during voluntary disruptions
kubernetes.io · 5 steps · unrated
control kubeflow pipelines v2 task caching to force re-execution when needed
kubeflow.org/docs · 5 steps · unrated
Configure Airflow 3 TaskFlow API tasks with explicit typed XCom serialization to avoid implicit pickling of large objects
airflow.apache.org · 5 steps · unrated

Give your agent this knowledge — and 15,600+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans