Назад | Перейти на главную страницу

Gcloud create node-pool навсегда зависает в автоматическом ремонте без узлов

При добавлении нового пула узлов в существующий кластер не удается зарегистрировать ни одного узла.

Команда, используемая для добавления пула узлов, следующая (имя проекта изменено):

gcloud container --project my-project node-pools create hm-pool --cluster ds-cluster-west4 --zone europe-west4-c --node-version 1.16.9-gke.2 --machine-type n1-highmem-4 --image-type COS --disk-type pd-standard --disk-size 100 --metadata disable-legacy-endpoints=true --scopes logging-write,monitoring,pubsub,service-control,service-management,storage-full,taskqueue,trace --num-nodes 2 --enable-autoupgrade --enable-autorepair --max-surge-upgrade 1 --max-unavailable-upgrade 0

Я получаю следующие сообщения об ошибках

This will enable the autorepair feature for nodes. Please see https://cloud.google.com/kubernetes-engine/docs/node-auto-repair for more information on node autorepairs.
Creating node pool hm-pool...done.
ERROR: (gcloud.container.node-pools.create) Operation [<Operation
 clusterConditions: [<StatusCondition
 message: 'All cluster resources were brought up, but: only 0 nodes out of 2 have registered; cluster may be unhealthy.'>]
 detail: 'All cluster resources were brought up, but: only 0 nodes out of 2 have registered; cluster may be unhealthy.'
 endTime: '2020-06-04T15:17:05.810921209Z'
 name: 'operation-1591282299021-26295b28'
 nodepoolConditions: []
 operationType: OperationTypeValueValuesEnum(CREATE_NODE_POOL, 7)
 selfLink: 'https://container.googleapis.com/v1/projects/473462597806/zones/europe-west4-c/operations/operation-1591282299021-26295b28'
 startTime: '2020-06-04T14:51:39.021046271Z'
 status: StatusValueValuesEnum(DONE, 3)
 statusMessage: 'All cluster resources were brought up, but: only 0 nodes out of 2 have registered; cluster may be unhealthy.'
 targetLink: 'https://container.googleapis.com/v1/projects/473462597806/zones/europe-west4-c/clusters/ds-cluster-west4/nodePools/hm-pool'
 zone: 'europe-west4-c'>] finished with error: All cluster resources were brought up, but: only 0 nodes out of 2 have registered; cluster may be unhealthy.

На консоли я вижу сообщение «Авторемонт узлов в пуле узлов hm-pool». и я вижу это hm-pool обновляется. В пуле 0 узлов.

Что я делаю не так?

Проблема заключалась в том, что теги, примененные к кластеру, отсутствовали в спецификации нового пула узлов. Я извлек информацию тегов из одного из существующих узлов, используя gcloud compute instances describe --format="value[delimiter=','](tags.items) INSTANCE-NAME и использовал вывод как аргумент для --tags опция команды создания пулов узлов. После этого пул узлов был успешно создан.