Background
The CreateContainerConfigError typically occurs when a container specification references secrets or configmaps that are missing or unavailable at container start-up.
Solution
The following should help to identify the most common causes of the CreateContainerConfigError:
-
Run the
kubectl describe
command. -
In the Events section, locate an Event with the following:
- Type:
Warning
- Reason:
Failed
- Type:
-
Check the Message associated with the event; the most common messages associated with the CreateContainerConfigError are as follows:
Error: secret "<secret_name>" not found
- the named secret object is not present in your clusterError: configmap "<configmap_name>" not found
- the named configmap object is not present in your cluster
-
Take the appropriate action:
Missing Object Action Secret Identify the missing Secret and create it in the namespace, or mount another Secret that already exists ConfigMap Identify the missing ConfigMap and create it in the namespace, or mount another ConfigMap that already exists -
Delete and recreate the pod.
-
View the newly created pod and verify that the status is no longer
CreateContainerConfigError
, but isRunning
.