Kubernetes manifests · Workloads

Pass configuration as environment variables

Load a ConfigMap and read one key from a Secret into environment variables.

envFrom:
  - configMapRef:
      name: app-config
env:
  - name: DB_PASSWORD
    valueFrom:
      secretKeyRef:
        name: db-secret
        key: password

Official Kubernetes manifests documentation

More workloads commands

All workloads commands · Kubernetes manifests cheatsheet

Was this page helpful?