<p>I have set up liveness and readiness probes for an application, e.g.:</p>
<pre><code>    readinessProbe:
      httpGet:
        path: /actuator/health/readiness
        port: 8080
    ...
    livenessProbe:
      httpGet:
        path: /actuator/health/liveness
        port: 8080
</code></pre>
<p>What I would like to do is whenever the probe is invoked by Kubernetes, its result is sent to an endpoint passing some additional information suchs as pod name, Docker image used, value from a secret, etc.</p>
<pre><code>PROBE INVOKED -&gt; RESULT COLLECTED -&gt; INVOKE ENDPOINT (http://xxx - payload {&quot;probe&quot;: &quot;liveness&quot;, &quot;result&quot;: &quot;OK&quot;, &quot;image&quot; : &quot;app:1.0.0&quot;, &quot;key&quot; : &quot;VALUE_EXTRACTED_FROM_A_SECRET&quot;, ...}
</code></pre>
<p>Could you indicate a way to achieve this?</p>

codependent
<p>There are many ways to do this (e.g. depending on your pipeline).<br />
You could call the probe endpoints yourself and react if the pod is not in the desired state.
You could could then call <code>kubectl describe</code>, <code>log</code> etc. and pass the result to your endpoint.<br />
You could do so in with different approaches bash, python, etc...</p>
