Manu Chadha
Manu Chadha

Reputation: 16729

upgrade VM for cassandra on GCP

I am moving my MVP application to GCP. It is a general web application with standard database workload (CRUD). I am using cassandra and play, each has its own docker image. I am not expecting much traffic to begin with so would like to start with smaller VMs to keep cost low. I am also using kubernetes operator for Cassandra - https://github.com/datastax/cass-operator

Would it be possible to change the machine configuration later (CPUs, disk size) for Cassandra when the traffic load increases? Would I have to stop the application completely when I am upgrading or would I be able to do rolling upgrade?

Any tips on how to approach upgrade later would be most appreciated.

Upvotes: 1

Views: 103

Answers (1)

Serhii
Serhii

Reputation: 4461

Yes, it's possible to change machine configuration later without downtime when using GKE cluster.

Have a look at the documentation Migrating workloads to different machine types:

A node pool is a subset of machines that all have the same configuration, including machine type (CPU and memory) authorization scopes. Node pools represent a subset of nodes within a cluster; a container cluster can contain one or more node pools.

When you need to change the machine profile of your Compute Engine cluster, you can create a new node pool and then migrate your workloads over to the new node pool.

and

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

  • Mark the existing node pool as unschedulable.
  • Drain the workloads running on the existing node pool.
  • Delete the existing 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.

Note: This tutorial is only applicable if your container does not have Cluster Autoscaling enabled. If the Autoscaler adds or removes nodes while you are attempting a migration, you might not be able to mark all the nodes in the pool as unschedulable and drain them properly.

Detailed step by step instruction with commands and examples available at the documentation. To disable Cluster Autoscaling you can follow the documentation Disabling autoscaling for an existing node pool:

gcloud container clusters update cluster-name --no-enable-autoscaling \
    --node-pool pool-name [--zone compute-zone --project project-id]

Upvotes: 1

Related Questions