k8s secret CSI driver and Helm
Background
The Secrets Store CSI Driver secrets-store.csi.k8s.io allows Kubernetes to mount multiple secrets, keys, and certs stored in enterprise-grade external secrets stores into their pods as a volume. Once the Volume is attached, the data in it is mounted into the container’s file system.
In Kubernetes, you can use a shared Kubernetes Volume as a simple and efficient way to share data between containers in a Pod.
1 | k create cm cm-test --from-file=./files/config.json --from-file=./files/db_password --from-file=./files/mysql |
进入pod:
1 | root@webserver:/etc/config# ls -l |
每个key entry都有一个file, file内容为value.