我正在尝试通过本文档使用 kubectl wait 命令检查 pod 的状态。以下是我正在尝试的命令
kubectl wait --for=condition=complete --timeout=30s -n d1 job/test-job1-oo-9j9kj
Run Code Online (Sandbox Code Playgroud)
以下是我得到的错误
Kubectl error: status.conditions accessor error: Failure is of the type string, expected map[string]interface{}
Run Code Online (Sandbox Code Playgroud)
和我的kubectl -o json output can be accessed via this github 链接。
有人可以帮我解决这个问题吗
在一个简单的 bash 脚本中,我想运行多个kubectl和helm命令,例如:
helm install \
cert-manager jetstack/cert-manager \
--namespace cert-manager \
--create-namespace \
--version v1.5.4 \
--set installCRDs=true
kubectl apply -f deploy/cert-manager/cluster-issuers.yaml
Run Code Online (Sandbox Code Playgroud)
我的问题是,在helm install命令之后我必须等到 cert-manager pod 运行,然后kubectl apply才能使用该命令。现在脚本调用它太早了,所以它会失败。