QuestionQ8Verified/Kubernetes Security FundamentalsCopy linkReport a problemAsk AstroTutorSave questionWhat is the recommended method for passing Secrets to a container running in a Pod?APass the Secrets as environment variables to the containerBStore the Secrets in a ConfigMap and mount the ConfigMap as a volume in the Pod.CInclude the Secrets directly in the container image.DMount the Secrets as a volume in the Pod.Show AnswerAnswerExplanationA Kubernetes Secret volume passes confidential data to the Pod as read-only files and is backed by tmpfs, so it is not written to nonvolatile storage. ConfigMaps are intended for non-confidential configuration, and secrets should not be embedded in container images. Environment variables are supported, but a Secret volume is the preferred choice here.Learn moreVolumes | KubernetesSecrets | KubernetesShow comments0Show commentsCommunity DiscussionNo comments yet. Be the first to start the discussion!
Community Discussion