<p>I am trying to check the status of a pod using kubectl wait command through this <a href="https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#wait" rel="nofollow noreferrer">documentation</a>.
Following is the command that i am trying</p>
<pre><code>kubectl wait --for=condition=complete --timeout=30s -n d1 job/test-job1-oo-9j9kj
</code></pre>
<p>Following is the error that i am getting</p>
<pre><code>Kubectl error: status.conditions accessor error: Failure is of the type string, expected map[string]interface{}
</code></pre>
<p>and my <code>kubectl -o json</code> output can be accessed via this github <a href="https://github.com/msraju2009/kubernetes-tests/blob/master/kubernetes-json-output.json" rel="nofollow noreferrer">link</a>.</p>
<p>Can someone help me to fix the issue</p>

Auto-learner
<p>To wait until your pod is running, check for &quot;condition=ready&quot;. In addition, prefer to filter by label, rather than specifying pod id. For example:</p>
<pre><code>$ kubectl wait --for=condition=ready pod -l app=netshoot 
pod/netshoot-58785d5fc7-xt6fg condition met
</code></pre>
<p>Another option is <a href="https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#-em-status-em-" rel="noreferrer">rollout status</a> - To wait until the deployment is done:</p>
<pre><code>$ kubectl rollout status deployment netshoot
deployment &quot;netshoot&quot; successfully rolled out
</code></pre>
<p>Both options works great in automation scripts, when it is required to wait for an app to be installed. However, as @CallMeLaNN noted for the second option, deployment &quot;rolled out&quot; is not necessarily without errors.</p>
