When I create secret with Rancher
and select it should be visible in all namespaces, it creates a secret without namespace
tag and with namespaceId: null
.
How to create such secret without Rancher
? When I use kubectl
, it always binds it to the namespace from the command context.
kubectl currently does not support creating secrets across namespaces.
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.
there are some work around option available to replicate the secret and configmap across the namespace in Kuberenetes.
You can check this out open source projects: