Which TWO of the following are valid approaches to manage secrets in a Kubernetes cluster?
Mounting secrets as volumes in pods is the Kubernetes-native best practice because the secret is rendered as individual files on a tmpfs volume, which is memory-backed and not written to disk. File permissions default to 0444, and can be tightened to 0400; additionally, when the secret is updated, kubelet eventually updates the mounted files, allowing for rotation without restarting the pod. This approach avoids exposure via /proc/environ and limits access to containers that explicitly mount the volume.
Why this answer
Kubernetes allows secrets to be mounted as volumes in pods, which is a secure approach as the secret data is stored in tmpfs (RAM-backed filesystem) and not written to disk on the node. This method avoids exposing secrets in environment variables that can be leaked through process dumps or logs, and it supports automatic updates when secrets are modified.
Exam trap
A common pitfall is selecting option A (passing secrets as environment variables) because it seems convenient, but environment variables can be exposed through /proc, logs, and debugging commands. The correct secure approaches are mounting secrets as volumes (C) and using external secrets managers (E).