<p>I am trying to use below command to curl to the pod itself using podip as currently I don't want kubelet to request my pod for health check.</p>

<pre><code>livenessProbe:
  exec:
    command:
    - curl
    - $POD_IP:9990/admin/ping
  initialDelaySeconds: 3
  periodSeconds: 5
</code></pre>

<p>but the env variable $POD_IP is not recognized here,</p>

<pre><code>Could not resolve host: $POD_IP
</code></pre>

<p>How to configure this so that env var can be read by curl in the command.</p>

<p><strong>reference:</strong>
<a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.9/#execaction-v1-core" rel="nofollow noreferrer">https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.9/#execaction-v1-core</a></p>

<p>try following :</p>

<pre><code>command:
- bash
- -c
- curl $POD_IP:9990/admin/ping
</code></pre>
