简体   繁体   English

为什么增加 GKE 集群的节点池大小后新节点实例不可用?

[英]Why are new node instances not available after Increasing GKE Cluster's Node Pool size?

I'm relatively new to K8's, and I've setup a private cluster with a single node pool on GKE.我对 K8 比较陌生,我已经在 GKE 上设置了一个带有单个节点池的私有集群。 The node pool was configured to have nodes on 3 zones in a single GCP region (Autoscaling enabled with minimum of 2 nodes and maximum of 20 total nodes).节点池配置为在单个 GCP 区域中的 3 个区域上具有节点(启用自动缩放,最少 2 个节点,最多 20 个节点)。

I ran into the following error upon trying to deploy new resources: Cannot schedule pods: Insufficient memory.我在尝试部署新资源时遇到了以下错误: Cannot schedule pods: Insufficient memory. I decided to disable Autoscaling on cluster's node pool, and then manually increase the number of nodes.我决定在集群的节点池上禁用自动缩放,然后手动增加节点数。 I applied the change, each Instance Group now has 3 instances (a total of 9).我应用了更改,每个实例组现在有 3 个实例(总共 9 个)。 However, the instances listed under the 'Nodes' section of the GKE Console does not reflect that.但是,GKE 控制台的“节点”部分下列出的实例并未反映这一点。 It show only 5 (which is actually a decrease from the original 6).它只显示 5 个(实际上比原来的 6 个减少了)。

在此处输入图像描述

GCP DOCS: https://cloud.google.com/kubernetes-engine/docs/how-to/resizing-a-cluster GCP 文档:https://cloud.google.com/kubernetes-engine/docs/how-to/resizing-a-cluster

What am I missing here?我在这里想念什么? Thanks谢谢

To clarify I am posting Community Wiki answer.为了澄清我正在发布社区 Wiki 答案。

The problem here was caused by mismatch between versions of the cluster and node pool.这里的问题是由集群和节点池的版本不匹配引起的。

By default, automatic upgrades are enabled for Google Kubernetes Engine (GKE) clusters and node pools.默认情况下,为 Google Kubernetes 引擎 (GKE) 集群和节点池启用自动升级

Here is documentation that helps to upgrade cluster or node pool manually. 是有助于手动升级集群或节点池的文档。


Upgrading to the default cluster version can be done by running the following command:可以通过运行以下命令来升级到默认集群版本:

gcloud container clusters upgrade CLUSTER_NAME --master

All nodes can be updated to the same version as the control plane by running this command:通过运行以下命令,所有节点都可以更新到与控制平面相同的版本:

gcloud container clusters upgrade

Following command should be used in case rolling back an upgrade:如果回滚升级,应使用以下命令:

gcloud container node-pools rollback NODE_POOL_NAME \  --cluster CLUSTER_NAME

See also this reference and this documentation .另请参阅本参考资料本文档

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM