<p>I want to know if it possible to view the content of a certificate that is currently loaded by NGINX.</p>

<p>The use case is in Kubernetes where a secret was changed with a new .key and .crt and I don't know if the pods have undergone a restart since the secret was changed.</p>

<p>I know its possible to view the currently installed secret on the Kubernetes cluster with </p>

<pre><code>kubectl get secret &lt;secret&gt; -o yaml
</code></pre>

<p>I confirmed the config file loaded by nginx by checking the process</p>

<p><code>ps aux</code></p>

<p>I also know that I can view the contents of the <code>nginx.conf</code> and see that it refers to the mount point where the certificate is located</p>

<pre><code>    ssl_certificate         /etc/vol/sslcert.crt;
    ssl_certificate_key     /etc/vol/sslcert.key;
</code></pre>

<p>But since the name of the .crt and .key never changed in the secret (only the values), I can't tell from that alone which certificate is currently loaded</p>

<p>Is there any way to confirm the actual content that is being held in memory?</p>

<p>My advice would be to access the server and get the certificate that returns. This answer uses openssl and should work for your case: <a href="https://serverfault.com/a/661982/380575">https://serverfault.com/a/661982/380575</a></p>
