If you start referencing a ConfigMap in a Pod specification, you are creating a dependency on that ConfigMap for your resources. For example, if you added some of the preceding examples to expose example-data as an environment variable, but hadn’t added the example-config ConfigMap to Kubernetes, when you try to deploy or update the Pod, it will report an error.
If this happens, the error will generally be reported in kubectl get pods or will be visible in the event log:
kubectl get pods
NAME READY STATUS RESTARTS AGEflask-4207440730-xpq8t 0/1 configmaps "example-config" not found 0 2d
kubectl get events
LASTSEEN FIRSTSEEN COUNT NAME KIND SUBOBJECT TYPE REASON SOURCE MESSAGE2d 2d 1 flask-4207440730-30vn0 Pod Normal ...