I'm using Google Cloud / Google Container Engine, and I have infrastructure scripts where I create a cluster and node pools and then perform operations on the node pools once they're setup.
In my scripts, I need to make sure that the node pools are setup and the cluster is in a ready state before proceeding.
It appears that the gcloud container node-pools create
command has no --wait
or --no-async
option, unlike the very similar gcloud container node-pools delete
. Is there such an option for create
? Else, is there a recommended way to "wait" until the node pool is ready?
I believe in my bash scripts, after creating a node pool, I can do a while loop, periodically checking the value of e.g. gcloud container clusters describe myclustername --zone myzone | tail -n 2 | grep "status" | awk '{print $2}'
until I get "RUNNING
" back, but perhaps there is a more elegant approach?
(It would be nice to have parity in options for creating and deleting node pools!)