Unresolved ConfigMap reference in container volume mount

You can mount ConfigMaps to Pods as volumes. This validator detects a condition when a ConfigMap mounted as a volume in PodTemplateSpec is not found. That can happen if the ConfigMap was deleted or renamed, or there was a typo in the volume mount spec. Note that this check is skipped for volume mounts marked as optional.

Affected Resources: Deployment, DaemonSet, StatefulSet, CronJob, Job, ReplicaSet, Pod

Example

kind: Deployment spec: template: spec: volumes: - name: my-config-volume configMap: name: my-config-map # This ConfigMap is not present optional: false

Resolution

  • Check if the ConfigMap is present in the same namespace.
  • Check if the ConfigMap is present in a different namespace. Kubevious Search can be a very handy tool to find ConfigMaps across namespaces. You cannot mount a ConfigMap from a different namespaces. In that case you would need to create a ConfigMap in namespace where the Pod resides.
  • Did you make a typo in the volume spec? Kubevious Search uses fuzzy logic to return results and can help with finding the correct ConfigMap.
  • Need other validation rules?

    Please let us know if there are other built-in validation rules you would like to see in Kubevious to detect misconfigurations and violations to best practices. Optionally, you can provide your details so we can reach out to you with follow-up questions.

    Share this article on:
    message