<p>Here lies the issue: I have a Kubernetes cluster with multiple nodes and I want to mount a single secret containing the key, crt, keystore data for all my nodes.</p>

<p>My process for generating them for a single node is as follows:</p>

<ol>
<li>Generate keystore bound to dns=hostname and ip=host_ip</li>
<li>Extract csr</li>
<li>Submit csr to my internal CA and downloading the p7b certificate chain</li>
<li>Import back the certificate chain into keystore</li>
<li>Export keystore into PKCS12 format</li>
<li>Extract crt</li>
<li>Extract key</li>
</ol>

<p>Let's assume I have completed these steps for all my nodes. What can I do to bundle all these into a single set of keys and keystore file ? Can i just concat all my certificate requests obtained at step 2 into a single csr and download the p7b for that and just follow through ?</p>

D.Razvan
<p>For anyone looking for a solution as well, I managed to generate a single certificate for all hostnames by generating the keystore with multiple dns/ip entries.</p>

<p>Example:</p>

<pre><code>keytool -genkey -keyalg RSA -alias &lt;your_alias&gt; -keystore &lt;your_keystore_name&gt;.jks -storetype JKS -keysize 2048 -validity 365 -ext SAN=dns:&lt;hostname1&gt;,ip:&lt;ip1&gt;,dns:&lt;hostname2&gt;,ip:&lt;ip2&gt;
</code></pre>

<p>You can also use KeyStore Explorer to generate the same (through a GUI) and it also supports wildcards such as *.domain.com</p>
