raphaelauv opened a new issue, #45595: URL: https://github.com/apache/airflow/issues/45595
### Apache Airflow version main (development) ### If "Other Airflow 2 version" selected, which one? _No response_ ### What happened? Using airflow main branch , with breeze `breeze start-airflow` I create a K8S connection with the `normal` UI, the connection is present in the UI , I can see it with the swagger but I can run a task using it   ```python from airflow import DAG from pendulum import today from airflow.providers.cncf.kubernetes.operators.pod import KubernetesPodOperator with DAG( dag_id="kubernetes_dag", schedule=None, start_date=today("UTC").add(days=-1) ): KubernetesPodOperator( task_id="task-one", namespace="default", kubernetes_conn_id="toto", image="alpine:3.16.2", cmds=["sh", "-c", "echo hello"], ) ``` fail with ```log {"timestamp":"2025-01-12T14:51:51.592478","logger":"task","error_detail":[{"exc_type":"AirflowNotFoundException","exc_value":"The conn_id `toto` isn't defined","syntax_error":null,"is_cause":false,"frames":[{"filename":"/opt/airflow/task_sdk/src/airflow/sdk/execution_time/task_runner.py","lineno":448,"name":"run"},{"filename":"/opt/airflow/task_sdk/src/airflow/sdk/execution_time/task_runner.py","lineno":547,"name":"_execute_task"},{"filename":"/opt/airflow/airflow/models/baseoperator.py","lineno":376,"name":"wrapper"},{"filename":"/opt/airflow/providers/src/airflow/providers/cncf/kubernetes/operators/pod.py","lineno":583,"name":"execute"},{"filename":"/opt/airflow/providers/src/airflow/providers/cncf/kubernetes/operators/pod.py","lineno":591,"name":"execute_sync"},{"filename":"/opt/airflow/providers/src/airflow/providers/cncf/kubernetes/operators/pod.py","lineno":1157,"name":"build_pod_request_obj"},{"filename":"/opt/airflow/providers/src/airflow/providers/cncf/kubernetes/hooks/ku bernetes.py","lineno":292,"name":"is_in_cluster"},{"filename":"/usr/local/lib/python3.9/functools.py","lineno":993,"name":"__get__"},{"filename":"/opt/airflow/providers/src/airflow/providers/cncf/kubernetes/hooks/kubernetes.py","lineno":300,"name":"api_client"},{"filename":"/opt/airflow/providers/src/airflow/providers/cncf/kubernetes/hooks/kubernetes.py","lineno":212,"name":"get_conn"},{"filename":"/opt/airflow/providers/src/airflow/providers/cncf/kubernetes/hooks/kubernetes.py","lineno":205,"name":"_get_field"},{"filename":"/usr/local/lib/python3.9/functools.py","lineno":993,"name":"__get__"},{"filename":"/opt/airflow/providers/src/airflow/providers/cncf/kubernetes/hooks/kubernetes.py","lineno":186,"name":"conn_extras"},{"filename":"/opt/airflow/providers/src/airflow/providers/cncf/kubernetes/hooks/kubernetes.py","lineno":176,"name":"get_connection"},{"filename":"/opt/airflow/airflow/hooks/base.py","lineno":65,"name":"get_connection"},{"filename":"/opt/airflow/airflow/models/connec tion.py","lineno":474,"name":"get_connection_from_secrets"}]}],"event":"Task failed with exception","level":"error"} ``` ### What you think should happen instead? _No response_ ### How to reproduce --- ### Operating System ubuntu 24.04 ### Versions of Apache Airflow Providers _No response_ ### Deployment Other ### 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]
