Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started

 

question

mzv avatar image
mzv asked ·

Does the cass-operator support multiple storage classes?

Hi! Is it possible to place pods in different storage locations using different SCs? And keep it that way on a rack level?

Example:

rack1 - sc1

rack2 - sc2

rack3 - sc3


Thanks,

Vladimir

cass-operator
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

john.sanda_194109 avatar image
john.sanda_194109 answered ·

Hi @mzv

You can configure the storage class but it applies to all Cassandra pods. Here is an example:

apiVersion: cassandra.datastax.com/v1beta1
kind: CassandraDatacenter
metadata:
  name: dc2
spec:
  clusterName: example
  serverType: cassandra
  serverVersion: "3.11.7"
  managementApiAuth:
    insecure: {}
  size: 9
  storageConfig:
      cassandraDataVolumeClaimSpec:
        storageClassName: server-storage
        accessModes:
          - ReadWriteOnce
        resources:
          requests:
            storage: 500Gi
  racks:
  - name: r1
    nodeAffinityLabels:
      topology.kubernetes.io/zone: us-east1-a
  - name: r2
    nodeAffinityLabels:
      topology.kubernetes.io/zone: us-east1-b
  - name: r3
    nodeAffinityLabels:
      topology.kubernetes.io/zone: us-east1-c

In general I would advise against using different settings across nodes within a single DC. You will have replicas in each rack. Let's say you used faster storage in r1 and in r2. This could lead to performance problems with replicas in r3.

If you want to use different resources for some nodes, then I would consider putting those nodes into a separate DC.

Cheers

John

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.