<p>I have a number of deployment objects in my namespace. I'd like to run <code>kubectl rollout status</code> for all of them at the same time. So, I'd like the command to exit, only when all rollouts are complete, or an error has occurred. How can I achieve that?</p>

<p>The only thing I got with so far is:</p>

<pre><code>kubectl get deploy -o name | xargs -n1 -t kubectl rollout status
</code></pre>

<p>But I hope there's something smarter.</p>

LIvanov
<p>You can use this simple check:</p>

<pre><code>#!/bin/bash
deploy=$(kubectl get deploy -o name)
for i in $deploy; do kubectl rollout status $i -w --timeout=30s; done
</code></pre>

<p>You can also build more advanced script using clues in this <a href="https://stackoverflow.com/questions/37448357/ensure-kubernetes-deployment-has-completed-and-all-pods-are-updated-and-availabl/37472801#37472801">post</a>. </p>
