bmoon4 commented on PR #28848:
URL: https://github.com/apache/airflow/pull/28848#issuecomment-1540158250

   Here's the error log
   ```
   [2023-05-09, 08:54:45 EDT] {pod.py:905} ERROR - The conn_id 
`kubernetes_default` isn't defined
   Traceback (most recent call last):
     File 
"/usr/local/lib/python3.8/site-packages/airflow/providers/cncf/kubernetes/operators/pod.py",
 line 533, in execute_sync
       self.pod_request_obj = self.build_pod_request_obj(context)
     File 
"/usr/local/lib/python3.8/site-packages/airflow/providers/cncf/kubernetes/operators/pod.py",
 line 859, in build_pod_request_obj
       "airflow_kpo_in_cluster": str(self.hook.is_in_cluster),
     File 
"/usr/local/lib/python3.8/site-packages/airflow/providers/cncf/kubernetes/hooks/kubernetes.py",
 line 249, in is_in_cluster
       self.api_client  # so we can determine if we are in_cluster or not
     File "/usr/local/lib/python3.8/functools.py", line 967, in __get__
       val = self.func(instance)
     File 
"/usr/local/lib/python3.8/site-packages/airflow/providers/cncf/kubernetes/hooks/kubernetes.py",
 line 257, in api_client
       return self.get_conn()
     File 
"/usr/local/lib/python3.8/site-packages/airflow/providers/cncf/kubernetes/hooks/kubernetes.py",
 line 171, in get_conn
       in_cluster = self._coalesce_param(self.in_cluster, 
self._get_field("in_cluster"))
     File 
"/usr/local/lib/python3.8/site-packages/airflow/providers/cncf/kubernetes/hooks/kubernetes.py",
 line 164, in _get_field
       if field_name in self.conn_extras:
     File "/usr/local/lib/python3.8/functools.py", line 967, in __get__
       val = self.func(instance)
     File 
"/usr/local/lib/python3.8/site-packages/airflow/providers/cncf/kubernetes/hooks/kubernetes.py",
 line 147, in conn_extras
       connection = self.get_connection(self.conn_id)
     File "/usr/local/lib/python3.8/site-packages/airflow/hooks/base.py", line 
72, in get_connection
       conn = Connection.get_connection_from_secrets(conn_id)
     File 
"/usr/local/lib/python3.8/site-packages/airflow/models/connection.py", line 
434, in get_connection_from_secrets
       raise AirflowNotFoundException(f"The conn_id `{conn_id}` isn't defined")
   airflow.exceptions.AirflowNotFoundException: The conn_id 
`kubernetes_default` isn't defined
   During handling of the above exception, another exception occurred:
   Traceback (most recent call last):
     File 
"/usr/local/lib/python3.8/site-packages/airflow/providers/cncf/kubernetes/operators/pod.py",
 line 745, in patch_already_checked
       self.client.patch_namespaced_pod(
     File "/usr/local/lib/python3.8/functools.py", line 967, in __get__
       val = self.func(instance)
     File 
"/usr/local/lib/python3.8/site-packages/airflow/providers/cncf/kubernetes/operators/pod.py",
 line 473, in client
       return self.hook.core_v1_client
     File "/usr/local/lib/python3.8/functools.py", line 967, in __get__
       val = self.func(instance)
     File 
"/usr/local/lib/python3.8/site-packages/airflow/providers/cncf/kubernetes/hooks/kubernetes.py",
 line 261, in core_v1_client
       return client.CoreV1Api(api_client=self.api_client)
     File "/usr/local/lib/python3.8/functools.py", line 967, in __get__
       val = self.func(instance)
     File 
"/usr/local/lib/python3.8/site-packages/airflow/providers/cncf/kubernetes/hooks/kubernetes.py",
 line 257, in api_client
       return self.get_conn()
     File 
"/usr/local/lib/python3.8/site-packages/airflow/providers/cncf/kubernetes/hooks/kubernetes.py",
 line 171, in get_conn
       in_cluster = self._coalesce_param(self.in_cluster, 
self._get_field("in_cluster"))
     File 
"/usr/local/lib/python3.8/site-packages/airflow/providers/cncf/kubernetes/hooks/kubernetes.py",
 line 164, in _get_field
       if field_name in self.conn_extras:
     File "/usr/local/lib/python3.8/functools.py", line 967, in __get__
       val = self.func(instance)
     File 
"/usr/local/lib/python3.8/site-packages/airflow/providers/cncf/kubernetes/hooks/kubernetes.py",
 line 147, in conn_extras
       connection = self.get_connection(self.conn_id)
     File "/usr/local/lib/python3.8/site-packages/airflow/hooks/base.py", line 
72, in get_connection
       conn = Connection.get_connection_from_secrets(conn_id)
     File 
"/usr/local/lib/python3.8/site-packages/airflow/models/connection.py", line 
434, in get_connection_from_secrets
       raise AirflowNotFoundException(f"The conn_id `{conn_id}` isn't defined")
   airflow.exceptions.AirflowNotFoundException: The conn_id 
`kubernetes_default` isn't defined
   ```
   @iJanki-gr
   
   Im going to test `Adding kubernetes_conn_id=None` in 
`/usr/local/lib/python3.8/site-packages/airflow/providers/cncf/kubernetes/operators/pod.py`
 


-- 
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]

Reply via email to