k8s-wait-for
k8s-wait-for copied to clipboard
kubectl wait command
What is the difference between the wait_for.sh
shell script and the kubectl wait
command
https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#wait
To be honest, I just heard of it from you, but after quickly playing with it, for example, it does not allow to wait for a job to complete. On the other hand, it allows waiting for the resource to be deleted.
I would say it's a bit lower level than wait_for.sh
, where there is a bit more logic coded to provide useful scenarios.
wait_for.sh
could use it internally. It does not, because it was created before kubectl wait
existed :-)
thanks for clarification. I would be nice if the readme has a small notice about it.
@groundnuty job wait for complete example https://hackernoon.com/kubectl-tip-of-the-day-wait-like-a-boss-40a818c423ac
kubectl wait --for=condition=complete --timeout=30s job/myjob
should work as an alternative, though I've yet to try.
It seems experimental though.
@TarekAS please feel welcome to come back with comments if you happen to test it k8s-wait script compensates for the shortcomings of kubectl, It would be great to replace parts of it with native kubectl commands!