title: kubectl: Use custom-columns output with maps
body: <p>I want to get the specific value of an annotation into a kubectl custom columns field. I can get all the current annotations on a resource like so:</p>
  
  <pre><code>kubectl get pvc -o custom-columns=NAME:.metadata.name,"ANNOTATIONS":.metadata.annotations -n monitoring
  </code></pre>
  
  <p>This returns a map:</p>
  
  <pre><code>NAME                                 ANNOTATIONS
  prometheus-k8s-db-prometheus-k8s-0   map[pv.kubernetes.io/bind-completed:yes pv.kubernetes.io/bound-by-controller:yes volume.beta.kubernetes.io/storage-provisioner:kubernetes.io/aws-ebs]
  prometheus-k8s-db-prometheus-k8s-1   map[pv.kubernetes.io/bind-completed:yes pv.kubernetes.io/bound-by-controller:yes volume.beta.kubernetes.io/storage-provisioner:kubernetes.io/aws-ebs]
  </code></pre>
  
  <p>And considering <code>kubectl -o custom-columns</code> uses JSONpath to the best of my knowledge, I figured I could do this:</p>
  
  <pre><code>kubectl get pvc -o custom-columns=NAME:.metadata.name,"ANNOTATIONS":".metadata.annotations['pv.kubernetes.io/bind-completed']" -n monitoring
  </code></pre>
  
  <p>But it seems not. Is there a way to do this?</p>