<p>I am new to Dev Ops. I am setting up a CD pipeline in the VSTS. I have used Deploy to Kubernetes task to deploy the application, which is working fine. </p>

<p>After Deploy to Kubernetes task, I have added one more Deploy to Kubernetes task and I want to execute below command</p>

<p><code>kubectl describe pods &lt;podname&gt;</code></p>

<p>Above command describe about the pod.</p>

<p>I can see there is no such command available in the Deploy to Kubernetes task (in VSTS pipeline) for describe. </p>

<p>Only available commands are <code>get, apply, set, exec, login, logout, create, delete, expose, run and top</code>.</p>

<p>By executing above commands, I want to make sure is each pods is running. </p>

<p>How can I execute the describe command in the VSTS CD pipeline?</p>

<p>Alternative option is, any other command, which will return same output as <code>describe pods &lt;podname&gt;</code> command.  </p>

<p>you can use labels to find the pod you are interested in:</p>

<pre><code>$ kg po --show-labels
NAME                                 READY     STATUS    RESTARTS   AGE       LABELS
frontend-76dc7bfc6d-7zcb8            1/1       Running   0          9h        app=Frontend,branch=develop,pod-template-hash=76dc7bfc6d
identityserverapp-f9684fc77-z9wtb    1/1       Running   0          9h        app=IdentityServerApp,branch=develop,pod-template-hash=f9684fc77

$ kg po --selector=app=Frontend
NAME                        READY     STATUS    RESTARTS   AGE
frontend-76dc7bfc6d-7zcb8   1/1       Running   0          9h
</code></pre>

<p>ps. <code>kg</code> = alias for <code>kubectl get</code></p>
