我正在尝试通过此documentation使用kubectl wait命令检查pod的状态。
以下是我正在尝试的命令
kubectl wait --for=condition=complete --timeout=30s -n d1 job/test-job1-oo-9j9kj
以下是我得到的错误
Kubectl error: status.conditions accessor error: Failure is of the type string, expected map[string]interface{}
和我的
kubectl -o json output can be accessed via this github
link。有人可以帮我解决问题
最佳答案
这完全看起来像您在输出中所描述的而不是Pod上在Job上运行kubectl wait --for=condition=complete
。
pods 没有--for=condition=complete
选项。确实,当我在Pod上运行它时,我得到的是:
$ kubectl wait --for=condition=complete pod/mypod-xxxxxxxxxx-xxxxx
error: .status.conditions accessor error: Failure is of the type string, expected map[string]interface{}
关于kubernetes - kubectl等待--for =条件=完成-超时= 30s,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53536907/