<p>I just add <code>kubectl wait --for=condition=ready pod -l app=appname --timeout=30s</code> in the last step of BitBucket Pipeline to report any deployment failure if the new pod somehow producing error.</p>
<p><strong>I realize that the wait doesn't really consistent. Sometimes it gets timed out even if new pod from new image doesn't producing any error, pod turn to ready state.</strong></p>
<blockquote>
<p>Try to always change deployment.yaml or push newer image everytime to test this, the result is inconsistent.</p>
</blockquote>
<p>BTW, I believe using <code>kubectl rollout status</code> doesn't suitable, I think because it just return after the deployment done without waiting for pod ready.</p>
<p>Note that there is not much difference if I change timeout from <code>30s</code> to <code>5m</code> since apply or rollout restart is quite instant.</p>
<ul>
<li>kubectl version: 1.17</li>
<li>AWS EKS: latest 1.16</li>
</ul>

<p>I'm placing this answer for better visibility as noted in the comments this indeed solves some problems with <code>kubectl wait</code> behavior.</p>
<p>I managed to replicate the issue and have some timeouts when my client version was older than server version.  You have to match your client version with server in order to <code>kubectl wait</code> work properly.</p>
