0
0
Apache Airflowdevops~20 mins

Kubernetes executor for dynamic scaling in Apache Airflow - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Kubernetes Executor Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
How does the Kubernetes Executor scale Airflow tasks?

In Airflow's Kubernetes Executor, how does dynamic scaling of task pods happen?

AIt creates a new pod for each task dynamically and deletes it after task completion.
BIt pre-creates a fixed number of pods and reuses them for all tasks.
CIt runs all tasks inside a single pod and scales the pod's CPU resources.
DIt schedules tasks on existing Kubernetes nodes without creating pods.
Attempts:
2 left
💡 Hint

Think about how Kubernetes manages workloads with pods for isolation.

💻 Command Output
intermediate
2:00remaining
Output of kubectl get pods during Airflow task execution

What is the expected output of kubectl get pods when Airflow is running tasks with the Kubernetes Executor?

Apache Airflow
kubectl get pods
AOnly one pod named airflow-scheduler running all tasks
BMultiple pods named airflow-task-xxxx in Running or Completed state
CNo pods related to Airflow tasks, only system pods
DPods named airflow-webserver running tasks
Attempts:
2 left
💡 Hint

Remember each task runs in its own pod with Kubernetes Executor.

Configuration
advanced
3:00remaining
Configuring Airflow to use Kubernetes Executor with dynamic scaling

Which configuration snippet correctly enables the Kubernetes Executor with dynamic pod scaling in airflow.cfg?

A
[core]
executor = KubernetesExecutor

[kubernetes]
namespace = airflow
in_cluster = True
worker_container_repository = apache/airflow
worker_container_tag = 2.6.2
B
[core]
executor = LocalExecutor

[kubernetes]
namespace = airflow
in_cluster = False
C
[core]
executor = CeleryExecutor

[kubernetes]
namespace = default
in_cluster = True
D
[core]
executor = KubernetesExecutor

[kubernetes]
namespace = default
in_cluster = False
worker_container_repository = apache/airflow
Attempts:
2 left
💡 Hint

Check the executor type and Kubernetes section for correct settings.

Troubleshoot
advanced
2:30remaining
Troubleshooting Airflow task pods stuck in Pending state

You notice Airflow task pods created by Kubernetes Executor remain in Pending state and never run. What is the most likely cause?

AThe Airflow webserver is not reachable by the user.
BAirflow scheduler is down and not creating pods.
CInsufficient Kubernetes cluster resources or missing node selectors preventing pod scheduling.
DThe DAG files are missing from the Airflow home directory.
Attempts:
2 left
💡 Hint

Think about what causes pods to stay Pending in Kubernetes.

🔀 Workflow
expert
3:00remaining
Order the steps for Airflow Kubernetes Executor dynamic scaling

Arrange the following steps in the correct order for how Airflow Kubernetes Executor dynamically scales task execution.

A3,2,1,4
B2,1,3,4
C1,3,2,4
D1,2,3,4
Attempts:
2 left
💡 Hint

Think about the natural flow from scheduler to pod creation to execution.