kubernetes - 更改 GKE 集群上的节点机器类型

标签 kubernetes google-cloud-platform google-kubernetes-engine

我有一个 GKE 集群,我正在尝试打开默认节点机器类型。

我已经尝试过:

  • 使用我想要的机器类型创建新节点池
  • 删除默认池。 GKE 将处理一点,然后不删除默认池。我认为这是一些未记录的行为,您无法删除默认池。

  • 我不想重新创建集群并重新应用我的所有部署/ secret /配置/等。

    k8s 版本:1.14.10-gke.24 (稳定 channel )

    集群类型:区域

    最佳答案

    改变/增加/减少您的最佳方法node pool规范将与:

  • 迁移

  • 要在不导致停机的情况下迁移您的工作负载,您需要:
  • 新建 node pool .
  • 标记现有 node pool因为不可安排。
  • 耗尽现有 node pool 上运行的工作负载.
  • 检查工作负载是否在新的 node pool 上正确运行.
  • 删除现有 node pool .

  • 您的工作负载将自动安排到新的 node pool 上.

    Kubernetes, which is the cluster orchestration system of GKE clusters, automatically reschedules the evicted Pods to the new node pool as it drains the existing node pool.



    有关于迁移工作负载的官方文档:

    This tutorial demonstrates how to migrate workloads running on a GKE cluster to a new set of nodes within the same cluster without incurring downtime for your application. Such a migration can be useful if you want to migrate your workloads to nodes with a different machine type.

    -- GKE: Migrating workloads to different machine types



    请查看以上指南,如果您对该主题有任何疑问,请告诉我。

    关于kubernetes - 更改 GKE 集群上的节点机器类型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60784363/

    相关文章:

    google-app-engine - 使用 Terraform 创建 App Engine 应用程序时出错

    google-cloud-platform - Cloud Composer (Airflow) 作业卡住

    docker - Kubernetes:获取网络上其他 Pod 的 IP 地址

    kubernetes - 在kubernetes pod中将URL解析为其他URL

    kubernetes - DataDog 日志摄取不适用于 Kubernetes 集群

    kubernetes - 与服务器localhost:8080的连接被拒绝-您是否指定了正确的主机或端口

    kubernetes - 为什么默认的 Google Kubernetes Engine 集群中有 3 个节点?

    kubernetes - 谷歌云 kubernetes 关闭节点

    kubernetes - 为什么在 Kubernetes 中引入 ReplicaSet?

    kubernetes - 当节点死亡/重新启动并具有 PersistentVolume 时的 StatefulSet 行为