<p>We have some process which create some artifices in specific namespace in k8s, one of the artifacts is a secret which is created in this namespace (e.g. ns1).
The problem is that this secret needs to be used also from different namespace (apps in ns1 and ns2 needs to use it ) , which option do I have in this case?
Should I copy the secret to ns2 (not sure if this is right option from security perspective ), is there a good pattern/direction/tool which can help for such case ?</p>

PJEM
<p>i would suggest the checking out : <a href="https://github.com/zakkg3/ClusterSecret" rel="nofollow noreferrer">https://github.com/zakkg3/ClusterSecret</a></p>
<p>Cluster secret automate the process the cloning the secrets across the namespaces.</p>
<p>when you need a secret in more than one namespace. you have to:</p>
<p>1- Get the secret from the origin namespace.</p>
<p>2- Edit the the secret with the new namespace.</p>
<p>3- Re-create the new secret in the new namespace.</p>
<p>This could be done with one command:</p>
<pre><code>kubectl get secret &lt;secret-name&gt; -n &lt;source-namespace&gt; -o yaml \
| sed s/&quot;namespace: &lt;source-namespace&gt;&quot;/&quot;namespace: &lt;destination-namespace&gt;&quot;/\
| kubectl apply -n &lt;destination-namespace&gt; -f -
</code></pre>
<p>Clustersecrets automates this. It keep track of any modification in your secret and it will also react to new namespaces.</p>
