Define a livenessProbe with secret httpHeaders Define a livenessProbe with secret httpHeaders kubernetes kubernetes

Define a livenessProbe with secret httpHeaders


One workaround I can think of is to create some bash script to run this health check, and put your secret data to the environment as usual.


Here some examples with curl and wget:

exec:command:  - /bin/sh  - -c  - "curl -H 'Authorization: Bearer $(AUTH_TOKEN)' 'http://example.com'"

exec:  command:  - /bin/sh  - -c  - "wget --spider --header \"Authorization: Bearer $AUTH_TOKEN\" http://some.api.com/spaces/${SPACE_ID}/entries"