Clau St
Clau St

Reputation: 1048

Kubernetes multiple secrets

I'm trying to mount several secrets in the same secret-volume for a kubernetes pod blueprint, but it's not accepted.

Tried and can't be created :

"spec": {
        "volumes": [
            {
              "name": "secret-volume",
              "secret": [
                  { "secretName": "secret1" },
                  { "secretName": "secret2" },
                  { "secretName": "secret3" }
              ]
            }

Like this it will just override them:

"volumes": [
   {
    "name": "secret-volume",
       "secret": { "secretName": "secret1" },
       "secret": { "secretName": "secret2" },
       "secret": { "secretName": "secret3" }
   }
]

Is there any way to mount a list of secrets in the same volume ? Or only 1 secret / volume at the moment?

Thanks

Upvotes: 3

Views: 8455

Answers (1)

Jordan Liggitt
Jordan Liggitt

Reputation: 18161

Only one secret is allowed per secret volume

Upvotes: 12

Related Questions