11

To wait for a certain pod to be completed the command is

kubectl wait --for=condition=Ready pod/pod-name

Similarly I want to wait for any one pod in the statefulset to be ready. I tried the command below which did not work,

kubectl wait --for=condition=Ready statefulset/statefulset-name

What should the command options look like?

agirlwithnoname
  • 111
  • 1
  • 3

2 Answers2

7

I used following and it works for me

kubectl wait -l statefulset.kubernetes.io/pod-name=activemq-0 --for=condition=ready pod --timeout=-1s
ImranRazaKhan
  • 1,955
  • 5
  • 33
  • 74
5
kubectl rollout status --watch --timeout=600s statefulset/name-of-statefulset

from https://github.com/kubernetes/kubernetes/issues/79606#issuecomment-779779928

747lo
  • 184
  • 2
  • 4
  • Thanks this works perfect: ```Waiting for 3 pods to be ready...``` ```Waiting for 2 pods to be ready...``` ```Waiting for 1 pods to be ready...``` ```partitioned roll out complete: 3 new pods have been updated...``` – Moss Feb 19 '23 at 02:48