PierreAntoineAP opened a new issue, #56886: URL: https://github.com/apache/airflow/issues/56886
### Apache Airflow version 3.1.0 ### If "Other Airflow 2/3 version" selected, which one? _No response_ ### What happened? When using the `KubernetesPodOperator` in Airflow with the parameter `is_delete_operator_pod=False`, the pod is still deleted after execution. This behavior prevents inspection of the pod after completion and breaks workflows where post-processing or debugging is required. **Steps to Reproduce:** 1. Define a DAG with a `KubernetesPodOperator` task. 2. Set `is_delete_operator_pod=False`. 3. Execute the DAG. 4. Observe that the pod is deleted from the Kubernetes cluster even though `is_delete_operator_pod` is set to `False`. **Expected Behavior:** The pod should remain in the cluster after task completion when `is_delete_operator_pod=False`, allowing inspection of logs, sidecars, and XCom files. **Environment:** * Airflow version: 3.0.3 * Kubernetes version: [your version] * DAG configuration: default KubernetesPodOperator settings, `is_delete_operator_pod=False` **Additional context:** This issue occurs even if `get_logs=True` and `do_xcom_push=True`. It seems the operator deletes the pod after reading logs/XCom, ignoring the `is_delete_operator_pod` parameter. **References / logs:** * Observed behavior in multiple DAG runs: pods disappear immediately after completion despite `is_delete_operator_pod=False`. * Related discussion in Airflow KubernetesPodOperator documentation regarding pod cleanup and sidecar handling. ### What you think should happen instead? _No response_ ### How to reproduce First, update the documentation of the Kubernetes provider. Because it is unclear; we don't even know what the different arguments are. ### Operating System Ubuntu 24.04.3 LTS ### Versions of Apache Airflow Providers _No response_ ### Deployment Official Apache Airflow Helm Chart ### Deployment details _No response_ ### Anything else? _No response_ ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [x] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
