<p>I need to find out if all deployments having label=a is in READY state? Example is below. I need to return true or false based on wether all deployments are in READY or NOT ready? I can parse text but I think there might be a more clever way with just kubectl and json path or something</p>
<pre><code>PS C:\Users\artis&gt; kubectl get deployment -n prod -l role=b
NAME           READY   UP-TO-DATE   AVAILABLE   AGE
apollo-api-b   0/3     3            0           107s
esb-api-b      0/3     3            0           11m
frontend-b     3/3     3            3           11m
</code></pre>

<p>Add <code>-o yaml</code> to see the YAML objects for each, which you can then use to build a <code>-o jsonpath</code> like <code>-o jsonpath='{range .items[*]}{.status.conditions[?(@.type == &quot;Available&quot;)].status}{&quot;\n&quot;}{end}'</code>. You can't do logic operations in JSONPath so you'll need to filter externally like <code>| grep  False</code> or something.</p>
