<p>How to pass in the <code>application.properties</code> to the Spring boot application using <code>configmaps</code>. Since the <code>application.yml</code> file contains sensitive information, this requires to pass in <code>secrets</code> and <code>configmaps</code>. In this case what options do we have to pass in both the sensitive and non-sensitive configuration data to the Spring boot pod.
I am currently using Spring cloud config server and Spring cloud config server can encrypt the sensitive data using the <code>encrypt.key</code> and decrypt the key.</p>

zilcuanu
<p>ConfigMaps as described by @paltaa would do the trick for non-sensitive information. For sensitive information I would use a <a href="https://github.com/bitnami-labs/sealed-secrets" rel="nofollow noreferrer">sealedSecret</a>.</p>
<p>Sealed Secrets is composed of two parts:</p>
<ul>
<li>A cluster-side controller / operator</li>
<li>A client-side utility: kubeseal</li>
</ul>
<p>The kubeseal utility uses asymmetric crypto to encrypt secrets that only the controller can decrypt.</p>
<p>These encrypted secrets are encoded in a SealedSecret resource, which you can see as a recipe for creating a secret.</p>
<p>Once installed you create your secret as normal and you can then:</p>
<p><code>kubeseal --format=yaml &lt; secret.yaml &gt; sealed-secret.yaml</code></p>
<p>You can safely push your sealedSecret to github etc.</p>
<p>This normal kubernetes secret will appear in the cluster after a few seconds and you can use it as you would use any secret that you would have created directly (e.g. reference it from a Pod).</p>
