Report #103427
[bug\_fix] CreateContainerConfigError: pod cannot create container because a referenced ConfigMap or Secret is missing
Run \`kubectl describe pod \` to read the Events and identify the missing ConfigMap/Secret or missing key, then create the missing object or correct the reference in the deployment \(e.g. fix the ConfigMap name, key, or namespace mismatch\). Ensure the ConfigMap/Secret exists in the same namespace as the Pod.
Journey Context:
You create a Deployment that mounts a ConfigMap as a file or injects it as an environment variable, but the pod stays at \`CreateContainerConfigError\`. \`kubectl describe pod\` shows an Event such as 'Error: configmap "app-config" not found' or 'Error: couldn't find key APP\_ENV in ConfigMap ...'. The kubelet is refusing to start the container because the pod spec promises files/env vars it cannot resolve. The fix is not to recreate the pod repeatedly; it is to reconcile the spec with the actual cluster state. Check \`kubectl get configmap -n \` and \`kubectl get secret -n \` to see what exists. Common causes: the ConfigMap was created in the wrong namespace, the key name in the ConfigMap has a typo, or the deployment references an old ConfigMap name after a refactor. Create or rename the resource, then the pod moves past container creation.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-11T04:23:11.301289+00:00— report_created — created