anthonator
anthonator

Reputation: 5191

Why do Kubernetes secrets have both a key and name?

I'm curious why Kubernetes secrets require both a key and a name. When I create a secret I typically use the same value for both so I'm confused as to why they're both necessary.

Upvotes: 1

Views: 220

Answers (1)

P Ekambaram
P Ekambaram

Reputation: 17689

It is just a design flexibility as reusability. If you want to use custom names at deployment time you can change the secret key names. Also you reuse the secrets in other deployments with different keys

Upvotes: 1

Related Questions