Is there any option like node affinity such that we can deploy cassandra cluster pods in GCP in a specified node pool. I am using cassandra operator 1.1.0 and cassandra version 3.11.6. Can any one please answer this!
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
Is there any option like node affinity such that we can deploy cassandra cluster pods in GCP in a specified node pool. I am using cassandra operator 1.1.0 and cassandra version 3.11.6. Can any one please answer this!
I'm on the road so I've asked the authors of the cass-operator to respond to your question. Cheers!
I would strongly recommend you upgrade your cass-operator version. In the latest release, we support passing in a simple nodeSelector as well as supporting nodeAffinity / taints / tolerations. Here's the part of our CRD that documents this a bit - we could use a better example in the repo if you've got a use case we could write up. Could you elaborate on what you want the end result to be?
Thanks for replying, We just want to check whether whenever there is a nodepool upgrade, is cassandra pods are moving to another node without data loss. So, just trying out that scenario like deploying cassandra cluster in a specific node-pool, and trying to drain that node to see if those pods are moving to another node without data loss.
Is it possible to deploy cassandra cluster in specific node-pool with cass-operator:1.1.0. if possible tell me the way. Thanks in advance
It looks like we added nodeSelector support in v1.1.0, but I believe there are a number of other great reasons you should upgrade.
https://github.com/datastax/cass-operator/commit/3b4720f62b7852e36bff8551c064d920c5e92fe2
We didn't support pushing tolerations down to the pods until v1.2.0, and it was added as part of this very generic customization ability.
https://github.com/datastax/cass-operator/commit/7ce9077beab7fb38f0796c303c9e3a3610d94691
You mentioned you are using GCP - are you using their network persistent disks, or local storage, or something else? GCP persistent disks can move to any other K8s worker node within the same availability zone, so if you're using multiple availability zones you should cass-operator's support to pin Cassandra racks to cloud availability zones.
I am using the below node and pod affinity options for to deploy cassandra cluster in a specific node pool
```
tolerations:
- key: "dedicated"
operator: "Equal"
value: "gto-operator"
effect: "NoSchedule"
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: node_pool
operator: In
values:
- pool-a
- pool-b
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchLabels:
app.kubernetes.io/name: ####
topologyKey: kubernetes.io/hostname
But the pods are deploying into anothe nodepoo pool-n 1. When I do kubectl get po cluster1-dc1-default-sts-0 -o yaml:
spec:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: cassandra.datastax.com/cluster
operator: Exists
- key: cassandra.datastax.com/datacenter
operator: Exists
- key: cassandra.datastax.com/rack
operator: Exists
topologyKey: kubernetes.io/hostname
Is there any option to deploy into a specified namespace
6 People are following this question.
DSE includes a version of Jackson-databind package identified as vulnerable to RCE in CVE-2020-8840
When is the Kubernetes operator available for DSE Graph, Analytics and Search?
Is it possible to scale down a cluster with cass-operator on Kubernetes?
Does cass-operator generate certificates by default?
Does the cass-operator support cluster shutdown and startup?
DataStax Enterprise is powered by the best distribution of Apache Cassandra ™
© 2021 DataStax, Titan, and TitanDB are registered trademarks of DataStax, Inc. and its subsidiaries in the United States and/or other countries.
Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries.
Privacy Policy Terms of Use