<p>I'm running a web service that I can not change any of the specifications. I want to use liveness probe with HTTP POST on Kubernetes. I couldn't find anything available. All of my efforts with busybox and netcat have failed. </p>

<p>Is there a solution? Is it possible to build a custom liveness probe from any Linux dist?</p>

<p>Kubernetes Probes only support HTTP GET, TCP &amp; Command.</p>

<p>If you must check something over HTTP POST you could use a command approach and just <code>curl -XPOST ..</code></p>

<p>An example would be:</p>

<pre><code>...
      containers:
        - name:  k8-byexamples-spring-rest
          image: gcr.io/matthewdavis-byexamples/k8-byexamples-spring-rest:1d4c1401c9485ef61322d9f2bb33157951eb351f
          ports:
            - containerPort: 8080
              name: http
          livenessProbe:
            exec:
              command:
                - curl
                - -X POST
                - http://localhost/test123
            initialDelaySeconds: 5
            periodSeconds: 5
...
</code></pre>

<p>For more explanation see: <a href="https://matthewdavis.io/kubernetes-health-checks-demystified/" rel="noreferrer">https://matthewdavis.io/kubernetes-health-checks-demystified/</a>.</p>

<p>Hope that helps!</p>
