If we need to wait for a pod to come up before proceeding with other actions, we can use kubectl wait:
kubectl wait
kubectl wait --for=condition=ready pod --selector "app=my-app" --timeout=60s
Source: man kubectl-wait
man kubectl-wait
Last updated 4 years ago