prometheus-adapter
prometheus-adapter copied to clipboard
Guide to use basic auth for prometheus adapter to VM
We are trying to connect prometheus adapter to external VM using basic auth but unable to to do. We used TLS certificate headers and for authentication we tried to use args like '--prometheus-header=Authorization=Basic cHJvbWV0aGV1czpwcm9tZXRoZXVz' where cHJvbWV0aGV1czpwcm9tZXRoZXVz is Base64 value for our username:password. While establishing connection we see errors like Bad Response, invalid character 'c'.
Please advise correct way to use basic auth in prometheus adapter.
/triage accepted /kind support
/assign @dgrisonnet
Hi @Maag2510 , could you perhaps try with: --prometheus-header="Authorization=Basic cHJvbWV0aGV1czpwcm9tZXRoZXVz"
hi @dgrisonnet , we tried the above approach but in this case getting the error like
net/http: invalid header field name ""Authorization"
I also tried --prometheus-header=Authorization "Basic cHJvbWV0aGV1czpwcm9tZXRoZXVz" but same bad response.
Please suggest correct way to use auth header.
@Maag2510 you can try with : --prometheus-header=Authorization=Basic cHJvbWV0aGV1czpwcm9tZXRoZXVz . It works normally in my environment. Note: Do not have double quotes.
This issue has not been updated in over 1 year, and should be re-triaged.
You can:
- Confirm that this issue is still relevant with
/triage accepted(org members only) - Close this issue with
/close
For more details on the triage process, see https://www.kubernetes.dev/docs/guide/issue-triage/
/remove-triage accepted