Complete the code to set the executor to KubernetesExecutor in Airflow configuration.
executor = '[1]'
Setting executor to KubernetesExecutor enables dynamic scaling using Kubernetes pods.
Complete the code to specify the namespace where Airflow pods will run.
kube_namespace = '[1]'
default namespace mixes pods with other apps.kube-system is reserved for system pods.The airflow namespace is commonly used to isolate Airflow pods in Kubernetes.
Fix the error in the pod template file by completing the container image name.
image: [1]The correct Docker image format is repository/name:tag. Here, apache/airflow:latest is correct.
Fill both blanks to configure resource limits for CPU and memory in the pod spec.
resources:
limits:
cpu: '[1]'
memory: '[2]'CPU limits use millicores like 500m (half a core), and memory limits use units like 512Mi (512 mebibytes).
Fill all three blanks to create a Kubernetes pod affinity rule for Airflow worker pods.
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: [1]
operator: [2]
values:
- [3]Exists without values.This affinity rule matches pods with label component=worker using the In operator.