Kubernetes : kubectl wait
enix.io › en › blogThis command allows you to block (i.e, wait) until a particular event happens, for instance: a specified resource is deleted; a specified resource transitions to a specific state; Waiting for resource deletion: kubectl wait --for=delete. In this case, you will use the --for=delete option as follows, for example on a pod:
kubectl-wait man page - kubernetes-client | ManKier
www.mankier.com › 1 › kubectl-wait# wait for the pod "busybox1" to contain the status condition of type "ready". kubectl wait --for=condition=ready pod/busybox1 # the default value of status condition is true, you can set false. kubectl wait --for=condition=ready=false pod/busybox1 # wait for the pod "busybox1" to be deleted, with a timeout of 60s, after having issued the …
Kubernetes : kubectl wait
https://enix.io/en/blog/kubernetes-tips-tricks-kubectl-wait$ kubectl -n nxs-r1-prod wait pod/rabbitmq-7575b7f589-dsdhl --for=condition=Ready --timeout=-1s pod/rabbitmq-7575b7f589-dsdhl condition met The case of services. As you can see in the list above, services unfortunately do not have a condition, but it could be very useful to check that at least one endpoint exists for the service in question ...