How to mount multiple files / secrets into common directory in kubernetes?

前端 未结 3 1299
无人及你
无人及你 2021-02-05 14:08

I\'ve multiple secrets created from different files. I\'d like to store all of them in common directory /var/secrets/. Unfortunately, I\'m unable to do that because

3条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-05 14:45

    (EDIT: Never mind - I just noticed @Jonas gave the same answer earlier. +1 from me)

    Starting with Kubernetes v1.11+ it is possible with projected volumes:

    A projected volume maps several existing volume sources into the same directory.

    Currently, the following types of volume sources can be projected:

    • secret
    • downwardAPI
    • configMap
    • serviceAccountToken

    This is an example for "... how to use a projected Volume to mount several existing volume sources into the same directory".

提交回复
热议问题