Skip to content

CreateContainerConfigError

The kubelet couldn’t build the container’s configuration, almost always because a referenced ConfigMap, Secret, or key is missing.

Other variants: configmap "app-config" not found, couldn't find key DB_PASSWORD in Secret shop/db-credentials.

  1. Read the event message: it names the object and, if relevant, the key.
  2. Check the object exists in the pod’s namespace: kubectl get secret db-credentials -n <pod-namespace>.
  3. Check the key: kubectl get secret db-credentials -n <ns> -o jsonpath='{.data}' | tr ',' '\n' lists key names (values are base64).
Cause Typical origin
Object created in a different namespace ConfigMaps and Secrets can’t be referenced across namespaces
Object not created yet The app was deployed before its config, or an external-secrets sync failed
Key renamed or misspelled db_password versus DB_PASSWORD
Secret managed by an operator that hasn’t synced Check the operator’s status on its custom resource

Create the object or key in the pod’s namespace, or mark the reference optional: true if the app can run without it. The kubelet retries on its own; the pod starts once the reference resolves.

Read next: ConfigMaps and Secrets.