How to verify certificates for Liveness probe configured to https? How to verify certificates for Liveness probe configured to https? kubernetes kubernetes

How to verify certificates for Liveness probe configured to https?


You can use Readiness command instead of HTTP request. This will give you complete control over the check, including the certificate exchange.

So, instead of:

readinessProbe:    httpGet:      path: /eh/heartbeat      port: 2347      scheme: HTTPS

, you would have something like:

readinessProbe:  exec:    command:    - python    - your_script.py

Be sure the script returns 0 if all is well, and non-zero value on failure.(python your_script.py is, of course, just one example. You would know what is the best approach for you)