<p>I have a public key that all my pods needs to have. </p>

<p>My initial thought was to create a ConfigMap or Secret to hold it but as far as I can tell neither of those can be used across namespaces. Apart from that, it's really boiler plate to paste the same volume into all my Deployments</p>

<p>So now I'm left with only, in my opinion, bad alternatives such as creating the same ConfigMap/Secret in all Namespaces and do the copy-paste thing in deployments.</p>

<p>Any other alternatives?</p>

<p>Extra information after questions.</p>

<ul>
<li>The key doesn't need to be kept secret, it's a public key, but it needs to be distributed in a trusted way.</li>
<li>It won't rotate often but when it happens all images can't be re-built.</li>
<li>Almost all images/pods needs this key and there will be hundreds of images/pods.</li>
</ul>

Andreas Wederbrand
<p>You can use Kubernetes initializers to intercept object creation and mutate as you want. This can solve copy-paste in all your deployments and you can manage it from a central location.</p>

<p><a href="https://medium.com/google-cloud/how-kubernetes-initializers-work-22f6586e1589" rel="nofollow noreferrer">https://medium.com/google-cloud/how-kubernetes-initializers-work-22f6586e1589</a></p>

<p>You will still need to create configmaps/secrets per namespace though. </p>
