The operator doesn’t accept 0. Changing the size in 
example-cass-dc-minimal.yaml doesn't work as I get error `The 
CassandraDatacenter "dc1" is invalid: spec.size: Invalid value: 1: spec.size in 
body should be greater than or equal to 1`

Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10

From: Oleksandr Shulgin<mailto:oleksandr.shul...@zalando.de>
Sent: 08 October 2020 05:40
To: User<mailto:user@cassandra.apache.org>
Subject: Re: Reducing no. of nodes to 0 without losing data

On Thu, Oct 8, 2020 at 12:21 AM Manu Chadha 
<manu.cha...@hotmail.com<mailto:manu.cha...@hotmail.com>> wrote:
Hi

I have created a Cassandra cluster on Kubernetes using cass-operator on gcp. It 
is for my personal experimentation. To avoid incurring cost, I want to stop the 
cluster when I am not using it and start it when I need it without losing data. 
Is there a way to do so? Would setting number of size to 0 in 
example-cassdc-minimal.yaml stop the compute resources without losing data? If 
I change the size to 3 again later, would the existing data be picked?

Depending if the operator is going to accept the size as 0 at all, but most 
probably not with the following policy in your storage class, as in the 
example[1]:

reclaimPolicy: Delete

You need some persistent storage and a suitable reclaim policy.

[1]: 
https://docs.datastax.com/en/cass-operator/doc/cass-operator/cassOperatorCloserLookConfiguration.html#CreateandapplyaStorageClass

Regards,
--
Alex

Reply via email to