I'm trying to add a step in the pipeline where a check is made if the PODS are ready before the pipeline moves forward.
I've read on forums that the kubectl wait
command can work, however, every time the pipeline is executed, the PODS are created again, so I can't put a default name on the kubectl wait command.
Does anyone have any tips, please?
If your pods are part of a deployment:
kubectl wait deployment <deployment-name> -n <deployment-namespace> --for condition=Available=True --timeout=120s