0
0
Apache Airflowdevops~10 mins

Kubernetes executor for dynamic scaling in Apache Airflow - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to set the executor to KubernetesExecutor in Airflow configuration.

Apache Airflow
executor = '[1]'
Drag options to blanks, or click blank then click option'
ALocalExecutor
BKubernetesExecutor
CSequentialExecutor
DCeleryExecutor
Attempts:
3 left
💡 Hint
Common Mistakes
Using LocalExecutor disables dynamic scaling.
SequentialExecutor runs tasks one by one, no parallelism.
CeleryExecutor requires a message broker setup.
2fill in blank
medium

Complete the code to specify the namespace where Airflow pods will run.

Apache Airflow
kube_namespace = '[1]'
Drag options to blanks, or click blank then click option'
Akube-system
Bdefault
Cairflow
Dproduction
Attempts:
3 left
💡 Hint
Common Mistakes
Using default namespace mixes pods with other apps.
Using kube-system is reserved for system pods.
3fill in blank
hard

Fix the error in the pod template file by completing the container image name.

Apache Airflow
image: [1]
Drag options to blanks, or click blank then click option'
Aairflow:apache/latest
Bairflow/apache:latest
Clatest/apache/airflow
Dapache/airflow:latest
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping repository and name parts.
Putting tag before name.
4fill in blank
hard

Fill both blanks to configure resource limits for CPU and memory in the pod spec.

Apache Airflow
resources:
  limits:
    cpu: '[1]'
    memory: '[2]'
Drag options to blanks, or click blank then click option'
A500m
B1Gi
C100m
D512Mi
Attempts:
3 left
💡 Hint
Common Mistakes
Using CPU limits in Gi units.
Using memory limits without units.
5fill in blank
hard

Fill all three blanks to create a Kubernetes pod affinity rule for Airflow worker pods.

Apache Airflow
affinity:
  podAffinity:
    requiredDuringSchedulingIgnoredDuringExecution:
      - labelSelector:
          matchExpressions:
            - key: [1]
              operator: [2]
              values:
                - [3]
Drag options to blanks, or click blank then click option'
Acomponent
BIn
Cworker
Dapp
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong label keys.
Using operators like Exists without values.