-
Notifications
You must be signed in to change notification settings - Fork 9
Scaling Up and Down
✅ Step 1: Get current running config.
For many basic config options, you can change values in the values.yaml
file. Next, we will scale our cluster using this method.
Check our current running values. This command exposes all the current running values in the system.
helm get manifest k8ssandra
Notice how each of the yaml files that make up the deployment is displayed here and there is a bunch... Yeah Kubernetes is just an OCEAN of YAML.
✅ Step 2: Scale the cluster up.
We can use the linux tool grep
to filter the output to find specific values. To find the current number of Cassandra nodes we run the following command.
helm get manifest k8ssandra | grep size
Notice output size: 1
.
This is the current number of cassandra nodes. Next, we are going to scale up to two nodes.
While there are a few ways to make this change with Helm, we will edit a file as it's recommended way with k8s environment.
Edit the file k8ssandra-local-civo.yaml
(for Local/civo installs) or k8ssandra.yaml
(for Datastax provided VMs) and set the cluster size to 2
. Apply the changes.
✅ Step 2a: For Local/Civo Installs
helm upgrade k8ssandra k8ssandra/k8ssandra -f k8ssandra-local-civo.yaml
✅ Step 2b: For Datastax provided VMs
helm upgrade k8ssandra k8ssandra/k8ssandra -f k8ssandra.yaml
Check the size again, it should be size: 2
now
helm get manifest k8ssandra | grep size
Watch the changes live:
watch kubectl get pods
✅ Step 3: Scale the cluster down
Historically, one of the most difficult operations with Cassandra has been scaling down a cluster. With K8ssandra's dynamic elasticity, it is now just as easy as scaling up. Let's try it!
Edit the file k8ssandra-local-civo.yaml
or k8ssandra.yaml
and set the cluster size to 1
. Apply the changes.
✅ Step 3a: For Local/Civo Installs
helm upgrade k8ssandra k8ssandra/k8ssandra -f k8ssandra-local-civo.yaml
✅ Step 3b: For Datastax provided VMs
helm upgrade k8ssandra k8ssandra/k8ssandra -f k8ssandra.yaml
Check the size again, it should be back to size: 1
now.
helm get manifest k8ssandra | grep size:
Proceed to the Step VII
Got questions? Ask us using discord chat or a community forum!