The scale-workers phase reports that nodes.json is out of date

The scale-workers phase stops without changes because the cluster has more workers than nodes.json records, and Terraform would destroy the servers of the unrecorded workers without draining them.

The scale-workers phase stops with an error that starts with the cluster has N worker node(s) but and that states that nodes.json records fewer workers. The phase changes nothing.

The nodes.json file in INFRA_WORK_DIR does not list every worker in the cluster. Terraform destroys every server that is missing from the worker set that it receives, so an out-of-date file would delete servers that the phase never drained.

Resolution

Compare the file with the nodes in the cluster:

kubectl --kubeconfig .kubernetes-install/kubeconfig get nodes
cat .kubernetes-install/nodes.json

Correct the workers list in nodes.json so that it names every worker in the cluster, and run the scale-workers phase again. A recorded worker that is already gone from Kubernetes is acceptable, because a failed removal leaves such a worker behind and the phase can retry it.