{"id":821,"library":"apache-airflow-providers-cncf-kubernetes","title":"Apache Airflow CNCF Kubernetes Provider","description":"The `apache-airflow-providers-cncf-kubernetes` package integrates Apache Airflow with Kubernetes, allowing users to orchestrate tasks by launching them as Kubernetes Pods. It provides operators and hooks for seamless interaction with Kubernetes resources. The current version, as of March 2026, is 10.15.0, and provider packages generally follow the Apache Airflow project's release cadence of roughly 2-3 months for minor versions, with patch releases as needed.","status":"active","version":"10.15.0","language":"python","source_language":"en","source_url":"https://github.com/apache/airflow/tree/main/airflow/providers/cncf/kubernetes","tags":["apache airflow","kubernetes","cncf","provider","orchestration","container"],"install":[{"cmd":"pip install apache-airflow-providers-cncf-kubernetes","lang":"bash","label":"Install latest version"}],"dependencies":[{"reason":"Core Airflow installation required to use the provider. Specific minimum version depends on provider version (e.g., >=2.11.0 for provider 10.14.0).","package":"apache-airflow","optional":false},{"reason":"Python client for Kubernetes API interaction. Version is tightly coupled with the provider.","package":"kubernetes","optional":false},{"reason":"Asynchronous Python client for Kubernetes API interaction.","package":"kubernetes_asyncio","optional":false}],"imports":[{"note":"Old import path from 'contrib' or direct 'operators.kubernetes_pod' without the 'cncf' submodule is deprecated and will cause ImportErrors in modern Airflow and provider versions.","wrong":"from airflow.contrib.operators.kubernetes_pod_operator import KubernetesPodOperator","symbol":"KubernetesPodOperator","correct":"from airflow.providers.cncf.kubernetes.operators.kubernetes_pod import KubernetesPodOperator"},{"symbol":"KubernetesHook","correct":"from airflow.providers.cncf.kubernetes.hooks.kubernetes import KubernetesHook"}],"quickstart":{"code":"from __future__ import annotations\n\nimport pendulum\n\nfrom airflow.models.dag import DAG\nfrom airflow.providers.cncf.kubernetes.operators.kubernetes_pod import KubernetesPodOperator\n\nwith DAG(\n    dag_id='kubernetes_pod_example',\n    schedule=None,\n    start_date=pendulum.datetime(2023, 1, 1, tz='UTC'),\n    catchup=False,\n    tags=['kubernetes', 'example'],\n) as dag:\n    start_pod_task = KubernetesPodOperator(\n        task_id='start_pod_task',\n        namespace='default',\n        name='my-custom-pod',\n        image='ubuntu:latest',\n        cmds=['bash', '-cx'],\n        arguments=['echo', 'Hello from KubernetesPodOperator!'],\n        do_xcom_push=False,  # Set to True to enable XCom pushing from the pod\n        is_delete_operator_pod=True, # Pod is deleted upon completion or failure\n        # Optional: Specify a Kubernetes connection ID for custom client config\n        # kubernetes_conn_id='my_kubernetes_connection',\n        # To access Airflow variables or connections inside the Pod,\n        # ensure your Airflow service account has necessary permissions.\n        # E.g., for in-cluster auth, configure service account token mount.\n    )\n","lang":"python","description":"This quickstart demonstrates a basic Airflow DAG using the `KubernetesPodOperator` to launch a simple Ubuntu pod that executes a 'hello world' command. The pod runs in the 'default' Kubernetes namespace and is configured to be deleted upon task completion. Ensure your Airflow environment has access to a Kubernetes cluster and the necessary permissions to create pods in the specified namespace."},"warnings":[{"fix":"Migrate Kubernetes client configurations from `airflow.cfg` to an Airflow connection of type 'Kubernetes' and specify `kubernetes_conn_id` in your `KubernetesPodOperator` tasks.","message":"The `KubernetesPodOperator` no longer supports configuring the Kubernetes client via settings in `airflow.cfg`'s `kubernetes` section. Instead, all client-related configurations must be defined explicitly in an Airflow connection and then referenced using the `kubernetes_conn_id` parameter in the operator. This change was deprecated in provider version 4.1.0 and fully removed in later versions.","severity":"breaking","affected_versions":">=4.1.0"},{"fix":"Refactor your `KubernetesPodOperator` tasks to use `container_resources` with proper `kubernetes.client.V1ResourceRequirements` objects instead of dicts for resource specification.","message":"Direct dictionary-based resource definitions in `KubernetesPodOperator` are deprecated and no longer supported. The `resource` parameter should be replaced with `container_resources` using `kubernetes.client.V1ResourceRequirements` objects for specifying CPU/memory requests and limits.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Always check the provider's `Requirements` section in its documentation or PyPI page (e.g., `pip install apache-airflow-providers-cncf-kubernetes==X.Y.Z` and verify dependency resolution). Ensure your Airflow installation meets the minimum version, and address any `kubernetes` client version conflicts by adjusting your `pip` dependencies or using virtual environments.","message":"Provider versions are tied to specific minimum Airflow core versions and `kubernetes` client library versions. For example, provider `10.14.0` requires `apache-airflow>=2.11.0` and `kubernetes>=35.0.0,<36.0.0`. Installing a newer provider with an older Airflow or conflicting `kubernetes` client versions can lead to `ImportError` or `TypeError` due to API changes.","severity":"breaking","affected_versions":"All versions"},{"fix":"Update import statements from `from airflow.providers.cncf.kubernetes.operators.kubernetes_pod import KubernetesPodOperator` to `from airflow.providers.cncf.kubernetes.operators.kubernetes_pod import KubernetesPodOperator`. Note the subtle difference in the last part of the path (the original was `operators.kubernetes_pod` directly, now it's still `operators.kubernetes_pod`). This seems like a common user mistake where they might have used an older, perhaps internal, or `contrib` module structure that was then removed, and the correct path is the one listed in 'correct' import section. A more precise warning refers to the *removal* of old backcompat objects/paths.","message":"The import path `airflow.providers.cncf.kubernetes.operators.kubernetes_pod` was deprecated. Using this path will cause `ImportError` in recent provider versions.","severity":"deprecated","affected_versions":"Recent major versions (e.g., after 10.0.0, based on reported issues)"},{"fix":"Always explicitly set `is_delete_operator_pod` to `True` or `False` based on your desired pod cleanup behavior, rather than relying on its default value.","message":"The default value for the `is_delete_operator_pod` parameter in `KubernetesPodOperator` changed in provider version 3.0.0. If not explicitly set, this can alter the lifecycle of the Kubernetes Pods launched by your tasks, potentially leaving completed pods running or deleting them unexpectedly.","severity":"gotcha","affected_versions":">=3.0.0"}],"env_vars":null,"last_verified":"2026-05-19T21:11:12.798Z","next_check":"2026-06-27T00:00:00.000Z","problems":[{"fix":"from airflow.providers.cncf.kubernetes.operators.kubernetes_pod import KubernetesPodOperator","cause":"The 'kubernetes_pod_operator' module has been deprecated and removed; the correct module is 'KubernetesPodOperator'.","error":"ModuleNotFoundError: No module named 'kubernetes_pod_operator'"},{"fix":"from airflow.providers.cncf.kubernetes.operators.kubernetes_pod import KubernetesPodOperator","cause":"The 'KubernetesPodOperator' has been moved from 'airflow.contrib.operators' to 'airflow.providers.cncf.kubernetes.operators'.","error":"ImportError: cannot import name 'KubernetesPodOperator' from 'airflow.contrib.operators'"},{"fix":"from airflow.providers.cncf.kubernetes.operators.kubernetes_pod import KubernetesPodOperator","cause":"The 'KubernetesPodOperator' class is not directly accessible from 'kubernetes_pod'; it needs to be imported from the correct path.","error":"AttributeError: module 'airflow.providers.cncf.kubernetes.operators.kubernetes_pod' has no attribute 'KubernetesPodOperator'"},{"fix":"pip install apache-airflow-providers-cncf-kubernetes","cause":"The 'apache-airflow-providers-cncf-kubernetes' package is not installed.","error":"ModuleNotFoundError: No module named 'airflow.providers.cncf.kubernetes'"},{"fix":"Replace 'is_delete_operator_pod=True' with 'on_finish_action=\"delete_pod\"' in the 'KubernetesPodOperator' initialization.","cause":"The 'is_delete_operator_pod' parameter has been renamed to 'on_finish_action' in newer versions of 'KubernetesPodOperator'.","error":"TypeError: __init__() got an unexpected keyword argument 'is_delete_operator_pod'"}],"ecosystem":"pypi","meta_description":null,"install_score":0,"install_tag":"stale","quickstart_score":null,"quickstart_tag":null,"pypi_latest":"10.17.0","cli_name":"airflow","cli_version":"","type":"library","homepage":"https://airflow.apache.org","github":"https://github.com/apache/airflow","docs":"https://airflow.apache.org/docs/apache-airflow-providers-cncf-kubernetes/10.17.0","changelog":"https://airflow.apache.org/docs/apache-airflow-providers-cncf-kubernetes/10.17.0/changelog.html","pypi":"https://pypi.org/project/apache-airflow-providers-cncf-kubernetes/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["workflow","devops","aws","gcp","azure"],"install_checks":{"last_tested":"2026-05-19","tag":"stale","tag_description":"widespread failures or data too old to trust","installed_version":"10.6.0","pypi_latest":"10.17.0","is_stale":true,"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"apache-airflow-providers-cncf-kubernetes","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"328.8M"},{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"apache-airflow-providers-cncf-kubernetes","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"apache-airflow-providers-cncf-kubernetes","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":31.4,"import_time_s":null,"mem_mb":null,"disk_size":"328M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"apache-airflow-providers-cncf-kubernetes","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"apache-airflow-providers-cncf-kubernetes","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"357.4M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"apache-airflow-providers-cncf-kubernetes","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"apache-airflow-providers-cncf-kubernetes","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":30.1,"import_time_s":null,"mem_mb":null,"disk_size":"357M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"apache-airflow-providers-cncf-kubernetes","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"apache-airflow-providers-cncf-kubernetes","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"346.1M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"apache-airflow-providers-cncf-kubernetes","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"apache-airflow-providers-cncf-kubernetes","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":23.9,"import_time_s":null,"mem_mb":null,"disk_size":"347M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"apache-airflow-providers-cncf-kubernetes","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"apache-airflow-providers-cncf-kubernetes","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"346.8M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"apache-airflow-providers-cncf-kubernetes","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"apache-airflow-providers-cncf-kubernetes","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":24.4,"import_time_s":null,"mem_mb":null,"disk_size":"348M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"apache-airflow-providers-cncf-kubernetes","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"apache-airflow-providers-cncf-kubernetes","exit_code":0,"wheel_type":"sdist","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"294.4M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"apache-airflow-providers-cncf-kubernetes","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"apache-airflow-providers-cncf-kubernetes","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":36.8,"import_time_s":null,"mem_mb":null,"disk_size":"292M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"apache-airflow-providers-cncf-kubernetes","exit_code":1,"wheel_type":null,"failure_reason":null,"import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null}]},"quickstart_checks":{"last_tested":"2026-04-24","tag":null,"tag_description":null,"results":[{"runtime":"python:3.10-alpine","exit_code":1},{"runtime":"python:3.10-slim","exit_code":1},{"runtime":"python:3.11-alpine","exit_code":1},{"runtime":"python:3.11-slim","exit_code":1},{"runtime":"python:3.12-alpine","exit_code":1},{"runtime":"python:3.12-slim","exit_code":1},{"runtime":"python:3.13-alpine","exit_code":1},{"runtime":"python:3.13-slim","exit_code":1},{"runtime":"python:3.9-alpine","exit_code":1},{"runtime":"python:3.9-slim","exit_code":1}]},"_links":{"self":"https://checklist.day/api/registry/apache-airflow-providers-cncf-kubernetes","v1":"https://checklist.day/v1/registry/apache-airflow-providers-cncf-kubernetes","v1_install":"https://checklist.day/v1/registry/apache-airflow-providers-cncf-kubernetes/install","v1_imports":"https://checklist.day/v1/registry/apache-airflow-providers-cncf-kubernetes/imports","v1_compatibility":"https://checklist.day/v1/registry/apache-airflow-providers-cncf-kubernetes/compatibility","v1_quickstart":"https://checklist.day/v1/registry/apache-airflow-providers-cncf-kubernetes/quickstart","docs":"https://checklist.day/docs"}}