The secret resource-type is unique--it cannot be accessed from pods outside of
its namespace. A simple way of copying common secret data (e.g.: docker registry credentials) between namespaces is provided by the --export
flag of kubectl get
. Pipe its output to kubectl apply -n <target namespace> -f -
, and you are done!
kubectl get secret gitlab-registry --namespace=revsys-com --export -o yaml |\ kubectl apply --namespace=devspectrum-dev -f -