<p>how to list the Kubernetes pod which has CharDevice in it ?</p>
<p>I could able to get the pod with CharDevice, but need to print the pod name only</p>
<pre><code>kubectl get pod -o jsonpath='{spec.volumes.hostPath.type==&quot;CharDevice&quot;}'
</code></pre>

Suhasini Subramaniam
<p>You can get json first and use <code>jq</code> to get desired result :</p>
<pre><code>kubectl get pod -o json |
jq -r '.items[]|select(any(.spec.volumes[];.hostPath.type==&quot;CharDevice&quot;)).metadata.name'
</code></pre>
