kubectl wait
Wait for resource(s) to reach a certain state. More information: https://kubernetes.io/docs/reference/kubectl/generated/kubectl_wait/.
- Wait for a deployment to become available:
kubectl wait --for condition=available deployment/
- Wait for all pods with a certain [l]abel to be ready:
kubectl wait --for condition=ready =
- Wait for a pod to be deleted:
kubectl wait --for delete
- Wait for a job to complete, within 120 seconds (if the condition isn't met on time, the exit status will be unsuccessful):
kubectl wait --for condition=complete job/ --timeout 120s
来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
