Currently az capi create seems to return as soon as the control plane is available and some kubectl commands return. There is likely to be ongoing provisioning of resources, so arguably the cluster isn't really ready at this point.
We could add an optional flag like --wait-for-nodes which would add the --control-plane-machine-count to the --node-machine-count values and then loop until that many nodes are Ready before returning from az capi create.
If a value is specified such as --wait-for-nodes=4, we use that value instead of adding the other two. This is to handle cases where the simple addition logic fails, such as multiple node pools all respecting --node-machine-count or a hard-coded user template that ignores it.
Currently
az capi create
seems to return as soon as the control plane is available and somekubectl
commands return. There is likely to be ongoing provisioning of resources, so arguably the cluster isn't really ready at this point.We could add an optional flag like
--wait-for-nodes
which would add the--control-plane-machine-count
to the--node-machine-count
values and then loop until that many nodes areReady
before returning fromaz capi create
.If a value is specified such as
--wait-for-nodes=4
, we use that value instead of adding the other two. This is to handle cases where the simple addition logic fails, such as multiple node pools all respecting--node-machine-count
or a hard-coded user template that ignores it.