cass-operator has a parameter spec.stopped (
https://github.com/datastax/cass-operator/blob/master/operator/example-cassdc-yaml/cassandra-3.11.x/example-cassdc-full.yaml#L65)
when set to true the underlying stateful sets are scaled down to 0 while
keeping the persistent volumes. This allows you to reduce your k8s cluster
size while not losing data. When you want to bring the cluster back up
change the parameter back to false.

On Thu, Oct 8, 2020 at 12:40 AM Oleksandr Shulgin <
oleksandr.shul...@zalando.de> wrote:

> On Thu, Oct 8, 2020 at 12:21 AM Manu Chadha <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
>
-- 

Christopher Bradford

Reply via email to