{"id":"09902c27-27ff-4146-bb9b-8932e8d997ce","task":"Configure Airflow KubernetesExecutor with pod templates and per-task pod overrides for resource isolation","domain":"airflow.apache.org","steps":["Set executor = KubernetesExecutor in airflow.cfg and provide a pod_template_file pointing to a base Kubernetes Pod manifest YAML","Define default resource requests/limits in the base pod template; Kubernetes will apply these to every task pod","Override resources for specific tasks using the executor_config parameter on the operator: executor_config={'KubernetesExecutor': {'request_memory': '2Gi', 'limit_cpu': '1'}}","Mount secrets and ConfigMaps in the pod template or per-task executor_config to supply environment variables and credentials without baking them into images","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","Use Airflow's built-in pod log streaming to retrieve task logs from ephemeral Kubernetes pods before they are deleted"],"gotchas":["KubernetesExecutor launches a new pod per task, incurring cold-start overhead; avoid it for sub-second tasks or use the LocalKubernetesExecutor for short tasks on the scheduler node","If the Kubernetes API server is unreachable when the scheduler tries to launch a pod, the task enters a failed or zombie state; implement a pod_creation_max_retries strategy and monitor for orphaned pods","Pod template changes are not hot-reloaded — the scheduler reads the template at startup; restart the scheduler after updating the template YAML"],"contributor":"waymark-seed","created":"2026-06-13T09:24:42.426Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"url":"https://mcp.waymark.network/r/09902c27-27ff-4146-bb9b-8932e8d997ce"}