# Creating secrets in all namespaces via cmd line

**URL:** <https://forums.suse.com/t/creating-secrets-in-all-namespaces-via-cmd-line/10753>\
**Category:** SUSE Rancher Prime\
**Created:** [June 13, 2018, 3:06pm UTC](https://forums.suse.com/t/creating-secrets-in-all-namespaces-via-cmd-line/10753 "2018-06-13T15:06:28Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeremyweber-np](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/jeremyweber-np/32/4190_2.png) [@jeremyweber-np](https://forums.suse.com/u/jeremyweber-np)\
**Post date:** [June 13, 2018, 3:06pm UTC](https://forums.suse.com/t/creating-secrets-in-all-namespaces-via-cmd-line/10753/1 "2018-06-13T15:06:28Z")

</div>

I have yet to discover the magic command line formula for creating a secret in all namespaces? Is this possible without doing the call multiple times? When creating the secret in the UI, the all namespaces is a great option, just looking for command line equivalent.

Id prefer the call not happen multiple times, as it would mean edits of the password via the UI would need to need to be done in multiple places ( 1 per namespace ).

---

<div class="post-metadata">

**Author:** ![cjellick](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/cjellick/32/2876_2.png) [@cjellick](https://forums.suse.com/u/cjellick)\
**Post date:** [June 13, 2018, 5:07pm UTC](https://forums.suse.com/t/creating-secrets-in-all-namespaces-via-cmd-line/10753/2 "2018-06-13T17:07:56Z")

</div>

Are you trying to do it via `kubectl` or `rancher`cmd line?

---

<div class="post-metadata">

**Author:** ![jeremyweber-np](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/jeremyweber-np/32/4190_2.png) [@jeremyweber-np](https://forums.suse.com/u/jeremyweber-np)\
**Post date:** [June 13, 2018, 5:26pm UTC](https://forums.suse.com/t/creating-secrets-in-all-namespaces-via-cmd-line/10753/3 "2018-06-13T17:26:28Z")

</div>

im using ./rancher kubectl create secret…

---

<div class="post-metadata">

**Author:** ![cjellick](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/cjellick/32/2876_2.png) [@cjellick](https://forums.suse.com/u/cjellick)\
**Post date:** [June 13, 2018, 6:41pm UTC](https://forums.suse.com/t/creating-secrets-in-all-namespaces-via-cmd-line/10753/4 "2018-06-13T18:41:17Z")

</div>

kubectl does not have support for creating secrets across namespaces. They are scoped to a single namespace. Rancher (via the API and UI) supports creating secrets at the project scope. This will replicate the secret to all namespaces in the project (present and future). But, that functionality is not in the rancher cli yet.

---

<div class="post-metadata">

**Author:** ![jeremyweber-np](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/jeremyweber-np/32/4190_2.png) [@jeremyweber-np](https://forums.suse.com/u/jeremyweber-np)\
**Post date:** [June 13, 2018, 7:05pm UTC](https://forums.suse.com/t/creating-secrets-in-all-namespaces-via-cmd-line/10753/5 "2018-06-13T19:05:18Z")

</div>

Thanks… Its what I expected. Will rely on the api for now.

---

<div class="post-metadata">

**Author:** ![naisanza](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/naisanza/32/3120_2.png) [@naisanza](https://forums.suse.com/u/naisanza)\
**Post date:** [January 23, 2020, 8:38pm UTC](https://forums.suse.com/t/creating-secrets-in-all-namespaces-via-cmd-line/10753/6 "2020-01-23T20:38:18Z")

</div>

Is there a timeline when this could be added
