In Cassandra Lunch #78, we will deploy Cassandra using DSE Operator to Kubernetes. The live recording of Cassandra Lunch, which includes a more in-depth discussion and a demo, is embedded below in case you were not able to attend live. If you would like to attend Apache Cassandra Lunch live, it is hosted every Wednesday at 12 PM EST. Register here now!
DataStax Kubernetes Operator automates the process of deploying and managing open-source Apache Cassandra® or DataStax Enterprise (DSE) in a Kubernetes cluster.
Cass Operator distills the user-supplied information down to the number of nodes and cluster name to manage the lifecycle of individual Kubernetes resources. Now the process of managing the distributed Cassandra or DSE data platform is turnkey and much easier, which means your team is free to focus on the application layer and its functionality.
Containers are a popular technology used to accelerate today’s application development. Thanks to prevalent container platforms like Docker, you can package applications efficiently. With containers, apps, and all of their dependencies are packaged together into a minimal deployable image. As a developer, you can use containers to move applications between environments and guarantee that your apps behave as expected. These goals led to the creation of container orchestration platforms. The leader in this space is Kubernetes.
Apache Cassandra is an open-source, NoSQL database built from the foundation of geographically distributed and fault-tolerant data replication. Given the nature of containers, Cassandra is a logical fit as the cloud-native data plane for Kubernetes.
To spin up a Cassandra cluster using the cases operator is fairly simple and takes a few moments in a local environment. I have created a repo on GitHub which you can follow along.
minikube start --cpus=5 --memory='10128m'
kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.5.3/cert-manager.yaml
kubectl apply -f https://raw.githubusercontent.com/rancher/local-path-provisioner/master/deploy/local-path-storage.yaml
kubectl apply -k github.com/k8ssandra/cass-operator/config/deployments/default
kubectl -n cass-operator apply -f dc.yaml
cassandrauser) and a random password. You can get those out of a Kubernetes secret and use them to log into your Cassandra cluster for the first time. For example:
CASS_USER=$(kubectl -n cass-operator get secret cluster1-superuser -o json | jq -r '.data.username' | base64 --decode) CASS_PASS=$(kubectl -n cass-operator get secret cluster1-superuser -o json | jq -r '.data.password' | base64 --d
ecode) kubectl -n cass-operator exec -ti cluster1-dc1-default-sts-0 -c cassandra -- sh -c "cqlsh -u '$CASS_USER' -p '$CASS_PASS'"
If you missed Cassandra Lunch #78: Cass Operator, it is embedded below! Additionally, all of our live events can be rewatched on our YouTube channel, so be sure to subscribe and turn on your notifications!
Cassandra.Link is a knowledge base that we created for all things Apache Cassandra. Our goal with Cassandra.Link was to not only fill the gap of Planet Cassandra but to bring the Cassandra community together. Feel free to reach out if you wish to collaborate with us on this project in any capacity.
We are a technology company that specializes in building business platforms. If you have any questions about the tools discussed in this post or about any of our services, feel free to send us an email!
Subscribe to our monthly newsletter below and never miss the latest Cassandra and data engineering news!