Report #888
[bug\_fix] CreateContainerConfigError: referenced ConfigMap or Secret key does not exist
Run \`kubectl describe pod\` to see which key is missing. Create the missing ConfigMap or Secret, or correct \`configMapKeyRef.key\` / \`secretKeyRef.key\` to match an existing key. If using \`envFrom\`, ensure every expected key exists or mark the reference optional only when appropriate.
Journey Context:
A pod stays in CreateContainerConfigError and never reaches Running. \`kubectl describe pod\` shows an event like "Error: couldn't find key DB\_PASSWORD in Secret my-app/db-creds". You inspect the Secret and realize it only contains DB\_HOST and DB\_USER; DB\_PASSWORD was never added. After updating the Secret with the missing key, the kubelet can build the container config and the pod starts. The fix works because kubelet resolves all environment-variable references before creating the container; a missing key makes the entire pod sandbox config invalid.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-13T14:54:29.758699+00:00— report_created — created