-
Notifications
You must be signed in to change notification settings - Fork 408
Description
We're playing around with Static Capacity to try and scale our CI cluster before runs. As part of that it we're kubectl scale-ing the nodepool, then need to wait for Karpenter to have started up all the nodes.
Our original plan was to use kubectl wait to watch the .status.nodes field, however it appears like this gets updated as soon as Karpenter has actioned the request rather than once the nodes have joined. This delay also means you can't just kubectl wait nodes ... --for=condition=ready=true as the nodes don't exist in Kubernetes yet.
Is there any cleaner way to wait for this scaling to complete? For now we're utilising the below hacky bash oneliner, but a more Kubernetes-native way would be great please.
timeout 10m bash -c "until kubectl get nodes -l karpenter.sh/nodepool=development-acceptance | grep -cw Ready | grep -qw $TARGET; do sleep 1; done"Thank you for shipping Static Capacity, I'm excitedly moving over all our Managed Node Groups!