Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change node machine type on GKE cluster

I have a GKE cluster I'm trying to switch the default node machine type on.

I have already tried:

  1. Creating a new node pool with the machine type I want
  2. Deleting the default-pool. GKE will process for a bit, then not remove the default-pool. I assume this is some undocumented behavior where you cannot delete the default-pool.

I'd prefer to not re-create the cluster and re-apply all of my deployments/secrets/configs/etc.

k8s version: 1.14.10-gke.24 (Stable channel)

Cluster Type: Regional

like image 809
Jacque006 Avatar asked Mar 21 '20 04:03

Jacque006


People also ask

What is default node pool?

Node pools allow association of processing nodes based on their characteristics. You can explicitly specify a pools list for a node. Node pools allow association of processing nodes based on their characteristics.

How do I update cluster nodes?

If one or more cluster nodes, or the cluster, is added to Server Manager, on the All Servers page, right-click the name of a node (or the name of the cluster), and then click Update Cluster.


1 Answers

The best approach to change/increase/decrease your node pool specification would be with:

  • Migration

To migrate your workloads without incurring downtime, you need to:

  • Create a new node pool.
  • Mark the existing node pool as unschedulable.
  • Drain the workloads running on the existing node pool.
  • Check if the workload is running correctly on a new node pool.
  • Delete the existing node pool.

Your workload will be scheduled automatically onto a new 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.

There is official documentation about migrating your workload:

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

Please take a look at above guide and let me know if you have any questions in that topic.

like image 160
Dawid Kruk Avatar answered Sep 21 '22 18:09

Dawid Kruk