kubectl-wait
Wait for resource(s) to reach a certain state. tldr-pages
On several platforms
Several platforms
Wait for a deployment to become available
kubectl wait --for condition=available deployment/deployment_nameIdentify--forThe condition to wait on: [create|delete|condition=condition-name[=condition-value]|jsonpath='{JSONPath expression}'=[JSONPath value]]. kubectl referenceWait for all pods with a certain label to be ready
kubectl wait --for condition=ready [po --selector label_key=label_valueIdentify--forThe condition to wait on: [create|delete|condition=condition-name[=condition-value]|jsonpath='{JSONPath expression}'=[JSONPath value]]. kubectl reference--selectorSelector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2) kubectl referenceWait for a pod to be deleted
kubectl wait --for delete [po pod_nameIdentify--forThe condition to wait on: [create|delete|condition=condition-name[=condition-value]|jsonpath='{JSONPath expression}'=[JSONPath value]]. kubectl referenceWait 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/job_name --timeout 120sIdentify--forThe condition to wait on: [create|delete|condition=condition-name[=condition-value]|jsonpath='{JSONPath expression}'=[JSONPath value]]. kubectl reference--timeoutThe length of time to wait before giving up. kubectl reference