kubernetesenvironment-variablesdocker-volumekubernetes-securitykubernetes-secrets

Kubernetes Secrets Volumes vs Environment Variables


Is there a recommended way to use Kubernetes Secrets? They can be exposed as environment variables or using a volume mount. Is one more secure than the other?


Solution

  • https://www.oreilly.com/library/view/velocity-conference-2017/9781491985335/video316233.html

    Kubernetes secrets exposed by environment variables may be able to be enumerated on the host via /proc/. If this is the case it's probably safer to load them via volume mounts.