<p>I wanna use <code>kubectl wait</code> command to wait until a pvc is bound.</p>
<p>I tried <code>kubectl wait --for=condition=bound pvc/my-pvc-claim --timeout=2s</code> with a pvc which is already bound, but it doesn't seem to work. This is the output <code>error: timed out waiting for the condition on persistentvolumeclaims/my-pvc-claim</code>.</p>
<p>I read <code>kubectl wait</code> documentation, but still can't understand which condition I should use. How can I accomplish that? Is there a more complete documentation explaining how to do that?</p>

goedi
<p>You can use the following command:</p>
<pre><code>while [[ $(kubectl get pvc myclaim -o 'jsonpath={..status.phase}') != &quot;Bound&quot; ]]; do echo &quot;waiting for PVC status&quot; &amp;&amp; sleep 1; done
</code></pre>
