jiribroulik opened a new issue, #42282: URL: https://github.com/apache/airflow/issues/42282
### Apache Airflow version 2.10.1 ### If "Other Airflow 2 version" selected, which one? 2.9.2 ### What happened? when airflow debug mode is enabled the kubeconfig sh script greps for invalid token thus unable to connect to k8s cluster. I hit the issue in aws eks environment. ### What you think should happen instead? _No response_ ### How to reproduce enable debug mode and then run any kubectl command from your dag. You will get 401 error saying: unable to parse the token, wrong formatting. The reason for this is that the grep get the sessionToken instead of k8s token that authenticates with k8s api. this is how to change the logging level: https://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html#logging-level this is the grep that get aws sessionToken instead of k8s api token: https://github.com/apache/airflow/blob/main/airflow/providers/amazon/aws/hooks/eks.py#L89 and this is the token it matches: 'X-Amz-Security-Token': b'IQoJb3JpZ2luX2VjEN3//////////wEaCXVzLWVhc3QtMSJHMEUCIQDGkojyARf8ka1imf4+Nztaon03YN+dEtEYxUvLY1n/FQIgO9eCbrKKQ5h9nY6fZwKKNvd7w48PyQgx4JzCEBbLchgqjAUIFhABGgwzMzEwMTM5ODY5MzYiDHsX+8rDL/scEHQDtSrpBD3IlZLQyF8xB11v57aTFDlqf4b+NPmfGRIxtg5DtJgQAeHXqdWHVG1q/sLP74pzM2TmDVDuoIEU7PHFySR ### Operating System ubuntu ### 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: commits-unsubscr...@airflow.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org