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

phaniharsha avatar image
phaniharsha asked Erick Ramirez answered

nodeAffinity does not schedule pods on the required workers

Hi Team,

I have added node affinity as below in CassandraDatacenter object yaml and deployed, I can that this is being added to cassandradatacenter as expected but is not replicating to cassandra statefulset and pods are not scheduling on the required nodes - can you please assist us if I am doing something wrong?

If you require any further information, please let me know.

apiVersion: cassandra.datastax.com/v1beta1
kind: CassandraDatacenter
metadata:
  name: dc1
spec:
  clusterName: cluster1
  managementApiAuth:
    insecure: {}
  size: 3
  storageConfig:
    cassandraDataVolumeClaimSpec:
      storageClassName: standard-ssd
      accessModes:
        - ReadWriteOnce
      resources:
        requests:
          storage: 5Gi
  affinity:
    nodeAffinity:
      requiredDuringSchedulingIgnoredDuringExecution:
        nodeSelectorTerms:
        - matchExpressions:
          - key: node_pool
            operator: In
            values:
            - pool-n2-s64-1
  serverType: cassandra

kubectl get cassdc dc1 -n cass-test -o yaml

1620748397715.png

Thanks,
Phani

cass-operator
1620748397715.png (41.7 KiB)
10 |1000

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

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered

Question was re-posted in forum.k8ssandra.io.

Please follow the discussion here. Cheers!

Share
10 |1000

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