Kubernetes YAML Config and Secrets/Combine Secret and ConfigMap into one volume

Project multiple sources into a single directory.

Section: Projected Volumes

Combine Secret and ConfigMap into one volume

yaml
yaml
volumes:
  - name: app-settings
    projected:
      sources:
        - configMap:
            name: app-config
        - secret:
            name: app-secrets

Learn 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 Projected Volumes
Basic ConfigMap YAML
Key-value application config in YAML.
OpenIn sheetyaml1 tag match
Opaque Secret with stringData
Author readable Secret YAML without manual base64.
OpenIn sheetyaml1 tag match
ConfigMap with file-like content
Mount application config files from YAML.
OpenIn sheetyaml1 tag match
Read specific secret keys into env vars
Map one Secret key to one variable.
OpenIn sheetyaml1 tag match
Mount ConfigMap as files
Expose configuration under a volume mount path.
OpenIn sheetyaml1 tag match
Mount Secret as files
Expose certificate or key material through a volume.
OpenIn sheetyaml1 tag match