Does the Executor automatically send tasks to pods, or do I need the operator to do that?
Each operator has the "executor_config" param so I'm not sure when to use either.
They serve different purposes.
Briefly:
KubernetesExecutor: You need to specify one of the supported executors when you set up Airflow. The executor controls how all tasks get run. In the case of the KubernetesExecutor, Airflow creates a pod in a kubernetes cluster within which the task gets run, and deletes the pod when the task is finished.
Basically, you would use this instead of something like Celery.
KubernetesPodOperator: This allows you to, essentially, run a container as a task, and that container will be run inside a pod on a kubernetes cluster.
You'd use this if you if you have containerized workloads that you need to schedule in Airflow, or if you have non-python code you want to execute as Airflow tasks.
Hope that is helpful.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With