Beyond single keys, a few patterns cover most real configuration.
The downward API gives a container facts about its own Pod: fieldRef with metadata.name, metadata.namespace, spec.nodeName or status.podIP. Apps use it to tag logs and metrics without hard-coding anything.
envFrom loads every key of a ConfigMap or Secret at once, and prefix puts a fixed string in front of each name, so several sources can't collide.
A ConfigMap or Secret marked immutable: true refuses edits. That protects it from accidents and lightens the API server's load, and it pushes you toward versioned names (flags-v1, flags-v2): point the Deployment at the new version and a rollback points it back.
For certificates and keys, mount a Secret as files rather than variables. Files don't show up in env output, and they update when the Secret changes.
A Pod field and a whole ConfigMap with a prefix.