Import environment values into a container.
Section: Pods and Containers
Load env from ConfigMap and Secret
yaml
yaml
envFrom:
- configMapRef:
name: app-config
- secretRef:
name: app-secretsExplanation
`envFrom` is concise for app-style configuration but can make exact variable origins less explicit than `env`.
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 Pods and Containers
Set explicit environment variables
Define environment variables with `env`.
Override container command and args
Set entrypoint-style command in YAML.
Expose named container ports
Name ports for Service targeting and probes.