Report #97177
[bug\_fix] CreateContainerConfigError: pod cannot create container due to missing config or secret
Run \`kubectl describe pod \` and read the Events section to identify the missing ConfigMap, Secret, or downward-API field. Create or rename the referenced object so the expected key exists. Verify the key names match exactly, including case. If using \`subPath\`, ensure the key is present in the referenced volume.
Journey Context:
A new deployment references \`configMapKeyRef: \{name: app-config, key: LOG\_LEVEL\}\` but the ConfigMap only has \`log\_level\`. The pod stays in \`CreateContainerConfigError\`. \`kubectl describe pod\` shows \`Error: configmap "app-config" not found\` or \`Couldn't find key LOG\_LEVEL in ConfigMap ...\`. The developer initially thinks the image is bad because the container never starts. After checking Events, they realize the environment variable resolver cannot find the key. Another common case is mounting a Secret named \`tls-certs\` that was created in a different namespace; Secrets are namespaced, so the pod cannot see it. Creating the Secret in the same namespace or correcting the name resolves it. The fix always starts with \`describe pod\`, because the error message tells you exactly which object is missing.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-25T04:40:36.843719+00:00— report_created — created