kubernetesterraformgoogle-kubernetes-enginecluster-computingdistributed

Is it possible to resize a node pool disk size on GKE with terraform whitout recreating the cluster?


Is it possible to resize a node pool disk size on GKE with Terraform without recreating (first delete, then create again with new settings) the cluster?

I want to automate the migration of the node pool with the workloads without recreating the cluster and without any downtime.

This is the output i got when i upscaled the cluster, it is kiling and recreating the whole node pool and i dont want that.


Solution

  • So to safely change the specs of a node pool one has to create second node pool and move all workloads there after which to delete the old one. You can do this the way @Enrique Tejada said. Refer to: https://cloud.google.com/kubernetes-engine/docs/tutorials/migrating-node-pool#step_4_migrate_the_workloads It is about machine_type but it seems that it is the same for disk_size. Currently I am struggling with this using terraform - I have the task to enable superiors to be able to change disk_size and machine_type by changing the values in the source code, without recreating the cluster. It seems that it is not possible.

    Here is a similar question Reduce boot disk size of a GKE cluster