airflow.providers.cncf.kubernetes.decorators.kubernetes

Module Contents

Functions

kubernetes_task([python_callable, multiple_outputs])

Kubernetes operator decorator.

airflow.providers.cncf.kubernetes.decorators.kubernetes.kubernetes_task(python_callable=None, multiple_outputs=None, **kwargs)[source]

Kubernetes operator decorator.

This wraps a function to be executed in K8s using KubernetesPodOperator. Also accepts any argument that DockerOperator will via kwargs. Can be reused in a single DAG.

Parameters
  • python_callable (Callable | None) – Function to decorate

  • multiple_outputs (bool | None) – if set, function return value will be unrolled to multiple XCom values. Dict will unroll to xcom values with keys as XCom keys. Defaults to False.

Was this entry helpful?