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

ted.petersson_164115 avatar image
ted.petersson_164115 asked ·

Is it possible to provide a custom sidecar when deploying Cassandra with the cass-operator on Kubernetes?

When running Cassandra on Kubernetes today I use a StatefulSet, where I can configure multiple containers. That way I can run both the Cassandra image and a custom image (as a sidecar) in the same Pod.

Is it possible to do the same/similar thing when using the Kubernetes Operator for Cassandra (cass-operator)?

cass-operatorkubernetesoperatorsidecar
1 comment
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.

The team responsible for releasing the Cassandra operator also released a management API sidecar for Cassandra which you might be interested in.

I'm going to reach out internally to the team and get them to respond directly to your question. Cheers!

0 Likes 0 · ·
bradfordcp avatar image
bradfordcp answered ·

With version 1.2.0 of cass-operator there is now a PodTemplateSpec parameter in the CRD which allows for specifying additional side car processes per pod.

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.

Cedrick Lunven avatar image
Cedrick Lunven answered ·

Hi @ted.petersson_164115 this is exactly how things work.

  • a CRD per DC
  • a StatefulSet per RACK
  • a pod per Cassandra node containing sidecar + c*


More information here from slides 43 to 47

https://github.com/DataStax-Academy/kubernetes-workshop-online/blob/master/4-materials/Cassandra-Developer-Workshop-Kubernetes.pdf


Next livestream for this workshop will be june 11th you should come and try with us, it is totally free, simply a live on youtube. All exercises and yaml in the sane github repo i showed you.

https://www.eventbrite.com/e/workshop-build-a-devops-pipeline-with-kubernetes-and-apache-cassandratm-tickets-106944768682?aff=erelexpmlt


3 comments 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.

Ok, A can see the Management API SideCar. But my question was really if I could (via CRD-CassandraDataCenter config) could provide my own custom sidecar?
Since I already have one today for handling backup/restore... I was wondering if I could reuse that image/logic when using cass-operator?

0 Likes 0 · ·
Cedrick Lunven avatar image Cedrick Lunven ♦ ted.petersson_164115 ·

Operator is looking over PODS for `readyness` and `liveness` on dedicated port/path. As long as you have the same specifications you could be ok.

  • The sidecar is opensource and you can also fork and specialized it.
  • You can also have 2 side-cars in the pod to expose your own custom logic.
0 Likes 0 · ·

Nice. Is it possible to have a custom sidecar image without forking the project?

I see that the Cassandra serverImage can be configured like this:
https://github.com/datastax/cass-operator/tree/master/docs/user#using-a-specific-image

Is it possible to configure a custom sidecar image in a similar way? I.e. adding an "extra" custom sidecar.
Or "overriding" the Management API SideCar to run your own image?

0 Likes 0 · ·