Iamcerba edited a comment on issue #13076:
URL: https://github.com/apache/airflow/issues/13076#issuecomment-765204373


   @Coqueiro it actually not completely correct, but will work in your case.
   
   Underneath this connection string converted to dict using "json.loads" and 
eventually in the code the following check applied:
   
   ```
           in_cluster = extras.get("extra__kubernetes__in_cluster")
   
           if in_cluster:
               self.log.debug("loading kube_config from: in_cluster 
configuration")
               config.load_incluster_config()
               return client.ApiClient()
   ```
   
   If you provide any string in the value of 
{"extra__kubernetes__in_cluster":"<any non empty string>"} you will enter IF 
clause as soon as bool("<any non empty string>") == True.
   
   The correct connection string will be:
   ```
   {"extra__kubernetes__in_cluster":true}
   ```
   
   And I personally use the following version of the config:
   ```
   {"extra__kubernetes__in_cluster": true, 
"extra__kubernetes__kube_config_path": "", "extra__kubernetes__kube_config": 
"", "extra__kubernetes__namespace": "spark-jobs"}
   ```


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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to