title: How to apply a jq filter to kubectl output in watch mode?
body: <p>I want to filter the output of a <code>kubectl</code> command running in <code>--watch</code> mode to keep an eye on changes to a certain k8s annotation. I'm using the following command:</p>
  
  <p><code>kubectl get pod my-pod --watch -o json | jq '.metadata.annotations["my-annotation"]'</code></p>
  
  <p>Problem is - nothing is printed until I stop the command. I'd like the <code>jq</code> to process the input and print it as the changes to <code>my-pod</code> happen.</p>
  
  <p>I tried using the <code>--unbuffered</code> flag but it doesn't fix it.</p>