<p>In my team we have a single huge ConfigMap Resource that holds all the important variables distributed to all our pods.</p>

<p>After some time we realized that it is very hard to follow up where those variables are finally used. I was wondering if there is any way with Helm or <code>kubectl</code> to figure out where the values of the ConfigMap are actually used. Like a list of all the pods being supplied by the ConfigMap etc.</p>

<p>I researched for it but somehow it seems nobody is talking about that. Therefore I might understand the concept wrong here?</p>

<p>Am thankful for any guidance here.</p>

<p>You cannot directly use kubectl <a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors/#supported-fields" rel="nofollow noreferrer">field selectors</a> to get the result. You can output all the pods in json and use <code>jq</code> to query from the output. For example, this query outputs name of all pods that uses configMap "kube-proxy" as volumes</p>

<pre class="lang-sh prettyprint-override"><code>$ kubectl get pods --all-namespaces -o json | jq '.items[] | select(.spec.volumes[].configMap.name=="kube-proxy")' | jq .metadata.name
</code></pre>
