Kubectl 的任何替代命令描述 pods <podname>

Any alternate command of Kubectl describe pods <podname>

我是 Dev Ops 的新手。我正在 VSTS 中设置 CD 管道。我已经使用部署到 Kubernetes 任务来部署应用程序,它运行良好。

部署到 Kubernetes 任务后,我又添加了一个部署到 Kubernetes 任务,我想执行以下命令

kubectl describe pods <podname>

以上命令描述了 pod。

我可以看到在部署到 Kubernetes 任务(在 VSTS 管道中)中没有这样的命令可用于描述。

唯一可用的命令是 get, apply, set, exec, login, logout, create, delete, expose, run and top

通过执行上面的命令,我想确保每个 pods 都是 运行。

如何在 VSTS CD 管道中执行 describe 命令?

替代选项是任何其他命令,它将 return 与 describe pods <podname> 命令相同的输出。

您可以使用标签找到您感兴趣的广告连播:

$ 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

ps。 kg = kubectl get

的别名