<p>When I create secret with <code>Rancher</code> and select it should be visible in all namespaces, it creates a secret without <code>namespace</code> tag and with <code>namespaceId: null</code>.</p>
<p>How to create such a secret without <code>Rancher</code>? When I use <code>kubectl</code>, it always binds it to the namespace from the command context.</p>

<p><strong>kubectl</strong> currently does not support creating secrets across namespaces.</p>
<p>They are available to a single namespace. Rancher supports it creating secrets at the project level. it will replicate the secret to all namespaces in the project (present and future). also, functionality is not in the rancher cli yet.</p>
<p>there are some work around option available to replicate the secret and configmap across the namespace in Kuberenetes.</p>
<p>You can check this out open source projects:</p>
<ol>
<li><a href="https://github.com/zakkg3/ClusterSecret" rel="noreferrer">https://github.com/zakkg3/ClusterSecret</a></li>
<li><a href="https://github.com/mittwald/kubernetes-replicator" rel="noreferrer">https://github.com/mittwald/kubernetes-replicator</a></li>
</ol>
