<p>I am trying to access some of our rest endpoints to check that our API container is up and running. If I can specify a PKI I can access our endpoints which currently are all behind authentication. Is this possible?</p>

<p>If not I will have to add a new endpoint.</p>

Dylan
<p>Step 1: add <a href="https://en.wikipedia.org/wiki/CURL" rel="nofollow noreferrer">curl</a> to your container image <a href="https://stackoverflow.com/questions/34571711/cant-run-curl-command-inside-my-docker-container">REF</a>, Hint: Modify the Docker file to include curl.</p>

<p>Step 2: (in kubernetes deployment) configure the resource to mount the <strong>certs</strong> needed to query (GET request) the REST endpoint.  <a href="https://kubernetes.io/docs/concepts/storage/volumes/" rel="nofollow noreferrer">REF</a> Hint: Follow the way serviceaccount credentials are mounted to a POD.</p>

<p>Step 3: Now use those certs which are mounted to your container. In the <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#define-a-liveness-command" rel="nofollow noreferrer">liveness probe</a> to curl it the way shown <a href="https://stackoverflow.com/a/56771903/4451944">here</a></p>

<p>At this point if you have curled successfully with status code 200. you will have a linux comand execution code 0 which lead to successfull liveness check else the pod will be restarted. </p>
