<p>My readiness probe specifies HTTPS and 8200 as the port to check my hashicorp vault pod.</p>
<pre><code>  readinessProbe:
    httpGet:
      scheme: HTTPS
      path: '/v1/sys/health?activecode=200'
      port: 8200
</code></pre>
<p>Once the pod is running kubectl describe pod shows this</p>
<pre><code>Readiness probe failed: Error checking seal status: Error making API request.

URL: GET http://127.0.0.1:8200/v1/sys/seal-status
Code: 400. Raw Message:

Client sent an HTTP request to an HTTPS server.
</code></pre>

Matthew Wimpelberg
<p>I have found <a href="https://stackoverflow.com/questions/63564594/hashicorp-vault-client-sent-an-http-request-to-an-https-server-readiness-pro">this similar problem</a>.  See <a href="https://stackoverflow.com/a/63565711/16739663">the whole answer here</a>.</p>
<p>According to <a href="https://www.vaultproject.io/docs/platform/k8s/helm/configuration" rel="nofollow noreferrer">this documentation</a>:</p>
<blockquote>
<p>The http/https scheme is controlled by the <code>tlsDisable</code> value.</p>
</blockquote>
<blockquote>
<p>When set to <code>true</code>, changes URLs from <code>https</code> to <code>http</code> (such as the <code>VAULT_ADDR=http://127.0.0.1:8200</code> environment variable set on the Vault pods).</p>
</blockquote>
<p>To turn it off:</p>
<pre class="lang-yaml prettyprint-override"><code>global:
  tlsDisable: false
</code></pre>
<blockquote>
<p><strong>NOTE</strong>:
Vault should always be <a href="https://www.vaultproject.io/docs/configuration/listener/tcp#tls_cert_file" rel="nofollow noreferrer">used with TLS</a> in production to provide secure communication between clients and the Vault server. It requires a certificate file and key file on each host where Vault is running.</p>
</blockquote>
<hr />
<p>See also <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/" rel="nofollow noreferrer">this documentation</a>. One can find there many examples of using readiness and liveness probes, f.e</p>
<pre class="lang-yaml prettyprint-override"><code>    readinessProbe:
      exec:
        command:
        - /bin/sh
        - -ec
        - vault status
      initialDelaySeconds: 5
      periodSeconds: 5
</code></pre>
