Deploying Orchestrators on Kubernetes (KubernetesExecutor, Astronomer, AWS MWAA)
Run Airflow at scale with KubernetesExecutor, Astronomer, or managed MWAA.
In plain words
Immutable Airflow/task image and dependencies. Next, service account, namespace, secrets, and network. Finally, logs, eviction, retry, autoscale, and control-plane health.
Think of it like…
Kubernetes orchestration is a hotel for task containers: each gets a room and key, the cluster books capacity, and the scheduler/front desk must remain up while guests churn.
Where you’ve seen it
KubernetesExecutor's pod_override sets requests: cpu: 1, memory: 2Gi, a job service account, node selector, and pod TTL; Astronomer adds deployment/version controls while MWAA keeps the managed control plane in AWS.
Words you’ll hear
- K8s Executor
- An Airflow executor that creates a distinct pod per task, trading launch overhead for isolation and elasticity.
- Astronomer
- A managed Airflow platform/vendor layer around deployment, observability, images, upgrades, and support.
- MWAA
- AWS Managed Workflows for Apache Airflow, which operates much of the control plane inside a managed AWS service.
- Operational boundary
- Per-task pods without warm-node capacity create cold-start latency, broad service accounts read unrelated secrets, and a scheduler that lacks eviction/PDB/network policy testing can lose task progress during cluster upgrades. Template pod resources/requests, use dedicated node pools and service accounts, set image pulls and secrets narrowly, apply disruption budgets/autoscaling, and measure queue, pending, start, and executor-runtime time.
Visual diagram
Theory & deep dive
K8s Executor: the working mechanism
Running Airflow on Kubernetes uses Pods for worker isolation-through KubernetesExecutor, Celery workers, or managed Astronomer/MWAA patterns-while scheduler and metadata control plane remain independently available.
Immutable Airflow/task image and dependencies. Service account, namespace, secrets, and network, then resource requests, queue, node pool, and executor; this exposes the state governed by MWAA.
KubernetesExecutor's pod_override sets requests: cpu: 1, memory: 2Gi, a job service account, node selector, and pod TTL; Astronomer adds deployment/version controls while MWAA keeps the managed control plane in AWS.
Deploying Orchestrators on Kubernetes: failure mode and production response
Per-task pods without warm-node capacity create cold-start latency, broad service accounts read unrelated secrets, and a scheduler that lacks eviction/PDB/network policy testing can lose task progress during cluster upgrades.
Template pod resources/requests, use dedicated node pools and service accounts, set image pulls and secrets narrowly, apply disruption budgets/autoscaling, and measure queue, pending, start, and executor-runtime time. Track Pending time as "pod waits before a node/image/secret are available", and make Resource request visible to the dataset owner.
How it works, step by step
Step 1 of 41. Package
Immutable Airflow/task image and dependencies. Running Airflow on Kubernetes uses Pods for worker isolation-through KubernetesExecutor, Celery workers, or managed Astronomer/MWAA patterns-while scheduler and metadata control plane remain independently available.
- Pending time
- pod waits before a node/image/secret are available
- Astronomer
- A managed Airflow platform/vendor layer around deployment, observability, images, upgrades, and support.
When to use it & trade-offs
What it is
Running Airflow on Kubernetes uses Pods for worker isolation-through KubernetesExecutor, Celery workers, or managed Astronomer/MWAA patterns-while scheduler and metadata control plane remain independently available. KubernetesExecutor's pod_override sets requests: cpu: 1, memory: 2Gi, a job service account, node selector, and pod TTL; Astronomer adds deployment/version controls while MWAA keeps the managed control plane in AWS.
Why it matters: Per-task pods without warm-node capacity create cold-start latency, broad service accounts read unrelated secrets, and a scheduler that lacks eviction/PDB/network policy testing can lose task progress during cluster upgrades. Template pod resources/requests, use dedicated node pools and service accounts, set image pulls and secrets narrowly, apply disruption budgets/autoscaling, and measure queue, pending, start, and executor-runtime time.
When to reach for it
- Run Airflow at scale with KubernetesExecutor, Astronomer, or managed MWAA.
- Choose K8s Executor because it provides this capability: An Airflow executor that creates a distinct pod per task, trading launch overhead for isolation and elasticity.
- Keep evidence for Pending time at "pod waits before a node/image/secret are available" so the last production stage-Operate - logs, eviction, retry, autoscale, and control-plane health-remains testable.
When to avoid or be careful
- Per-task pods without warm-node capacity create cold-start latency, broad service accounts read unrelated secrets, and a scheduler that lacks eviction/PDB/network policy testing can lose task progress during cluster upgrades.
- Do not conflate Astronomer with K8s Executor. The second concept contributes different behavior: A managed Airflow platform/vendor layer around deployment, observability, images, upgrades, and support.
- Release only after this guardrail is in place: Template pod resources/requests, use dedicated node pools and service accounts, set image pulls and secrets narrowly, apply disruption budgets/autoscaling, and measure queue, pending, start, and executor-runtime time.
K8s Executor / Astronomer / MWAA - roles, limits, and operating cost
Strengths: An Airflow executor that creates a distinct pod per task, trading launch overhead for isolation and elasticity. Running Airflow on Kubernetes uses Pods for worker isolation-through KubernetesExecutor, Celery workers, or managed Astronomer/MWAA patterns-while scheduler and metadata control plane remain independently available.
Watch out: Per-task pods without warm-node capacity create cold-start latency, broad service accounts read unrelated secrets, and a scheduler that lacks eviction/PDB/network policy testing can lose task progress during cluster upgrades.
Strengths: A managed Airflow platform/vendor layer around deployment, observability, images, upgrades, and support. In this workflow it supports: Schedule pod - resource requests, queue, node pool, and executor.
Watch out: The operating cost is real: scheduling guarantee distinct from optional limit.
Strengths: AWS Managed Workflows for Apache Airflow, which operates much of the control plane inside a managed AWS service. Its output can be checked with Task cold start.
Watch out: Operating guardrail: Template pod resources/requests, use dedicated node pools and service accounts, set image pulls and secrets narrowly, apply disruption budgets/autoscaling, and measure queue, pending, start, and executor-runtime time.
Interview signals & numbers to know
When this topic comes up
- “Where is the failure boundary for K8s Executor, and how would Pending time reveal it?”
- “Why is Astronomer distinct from this behavior: AWS Managed Workflows for Apache Airflow, which operates much of the control plane inside a managed AWS service?”
- Production clue: Per-task pods without warm-node capacity create cold-start latency, broad service accounts read unrelated secrets, and a scheduler that lacks eviction/PDB/network policy testing can lose task progress during cluster upgrades.
- Design probe: Template pod resources/requests, use dedicated node pools and service accounts, set image pulls and secrets narrowly, apply disruption budgets/autoscaling, and measure queue, pending, start, and executor-runtime time.
Benchmarks & rules of thumb
- Pending time
- pod waits before a node/image/secret are available
- Resource request
- scheduling guarantee distinct from optional limit
- Task cold start
- pod admission and image pull added to logical SLA
Common mistakes & follow-ups
Common interview mistakes
- Per-task pods without warm-node capacity create cold-start latency, broad service accounts read unrelated secrets, and a scheduler that lacks eviction/PDB/network policy testing can lose task progress during cluster upgrades.
- Reporting success from a job exit code without checking Pending time and Resource request.
- Treating this example as complete without replay, rollback, or access boundaries: KubernetesExecutor's
pod_overridesetsrequests: cpu: 1, memory: 2Gi, a job service account, node selector, and pod TTL; Astronomer adds deployment/version controls while MWAA keeps the managed control plane in AWS.
Likely interviewer follow-ups
- How would you prove this contract instead of only checking that the command ran: An Airflow executor that creates a distinct pod per task, trading launch overhead for isolation and elasticity.
- What does the recovery plan do when this occurs? Per-task pods without warm-node capacity create cold-start latency, broad service accounts read unrelated secrets, and a scheduler that lacks eviction/PDB/network policy testing can lose task progress during cluster upgrades.
- When is K8s Executor insufficient for Resource request, and what does adding Astronomer cost in Pending time?
Knowledge check
Put it into practice
Practice related interview Q&A
Apply Deploying Orchestrators on Kubernetes (KubernetesExecutor, Astronomer, AWS MWAA) with data engineer interview Q&A and hands-on practice.