<p>I came up with the use case where I need to give specific name of secret token when it gets generated during creation of namespace. </p>

<p>So when we create a namespace in K8S we will get one secret token like below.</p>

<pre><code>NAMESPACE               NAME                                    TYPE                                  DATA      AGE
dev                     secrets/default-token-vvlzv             kubernetes.io/service-account-token   3         1d
devops                  secrets/default-token-0xpt0             kubernetes.io/service-account-token   3         9d
</code></pre>

<p>So What we want is  "default-token-vvlzv" should be generated as user given name like "dev-token". </p>

<p>Is there any way to achieve this ?</p>

<p>To the best of my knowledge, there is no such option. However, if you're creating your namespaces via software and not manually through kubectl, you can always clone the secret token to a copy with a name of your liking upon namespace creation.
Do you automatically create namespaces or is that for a manual use-case?</p>

<p>Cheers,
Christian</p>
