Expose certificate or key material through a volume.
Section: Secrets
Mount Secret as files
yaml
yaml
volumes:
- name: tls
secret:
secretName: app-tls
containers:
- name: api
volumeMounts:
- name: tls
mountPath: /etc/tls
readOnly: trueLearn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Secrets
Opaque Secret with stringData
Author readable Secret YAML without manual base64.
Read specific secret keys into env vars
Map one Secret key to one variable.
Combine Secret and ConfigMap into one volume
Project multiple sources into a single directory.
ConfigMap with file-like content
Mount application config files from YAML.