What’s New With The K8ssandra Operator
Published: 2022-05-26 19:23:24

*In this post, we’ll give an overview of the latest release of the K8ssandra Operator, which now provides multi-cluster and multi-region support for Apache Cassandra® databases deployed in Kubernetes.*

If you’ve ever used Kubernetes, you know it’s a powerful framework for cloud-based systems. You also probably know that creating, deploying, and managing these systems can be a nightmare.

Besides creating the necessary Kubernetes objects such as pods, deployments, services, and configMaps, you also have to wire all the pieces together so they can talk to each other. The more components your system has, the more complex it all becomes.

Fortunately, when it comes to [Apache Cassandra®](https://cassandra.apache.org/_/index.html), [K8ssandra](https://k8ssandra.io/) takes care of all this heavy lifting for you.

[K8ssandra](https://k8ssandra.io/) is an open-source project built to simplify running Cassandra on Kubernetes. It does this by providing a suite of tools that automate operational tasks, such as repairs, backup/restore, and monitoring.

Part of the overall K8ssandra project is the [K8ssandra Operator](https://github.com/k8ssandra/k8ssandra-operator), which provides single or multi-cluster, multi-region support in Kubernetes when deployed with K8ssandra. In short, by using this Operator, all of the components for metrics, backup and more are already installed and wired together, (which is good news for your team).

So, now that we’ve dropped the latest release of the K8ssandra Operator, here’s a quick peek into what it’s all about, what’s new, and why it matters to developers.

#Meet the K8ssandra Operator#
Our newest implementation, K8ssandra Operator, allows developers to deploy Cassandra databases in multi-cluster and multi-region Kubernetes environments. It also works in single-cluster and single-region Kubernetes deployments. Here’s an architecture diagram from the project’s [Readme](https://github.com/k8ssandra/k8ssandra-operator/blob/main/README.md) on Github.

![Figure 1. K8ssandra multi-cluster deployment architecture.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/csv68yosbu4fyelcao3x.png)
**Figure 1. K8ssandra multi-cluster deployment architecture.**

To closely match this setup, we’ve set up a Google Kubernetes Engine (GKE), a managed environment that allows you to deploy, manage, and scale your containerized applications using Google.

In Figure 1, there are three Kubernetes clusters with a K8ssandra operator in each. The bottom two are the “data-plane,” and the top cluster is the “control-plane.” In US East 1, there are two data plane clusters in US East 1 and a control plane cluster. In US West 1, there’s one data plane cluster.

One difference between a data plane and a control plane is that some controllers only run in the control plane due to a configuration setting. But the most important distinction is that we only create connections to remote clusters and orchestrate across the clusters in the control plane.

For now, the Operator requires you to have routable pod IPs between Kubernetes clusters, though this may be relaxed in the future. If you’re running the Operator in a cloud provider like Amazon Web Services, you can get routable IPs by installing the Kubernetes clusters in the same Virtual Private Cloud (VPC). If you’re running multiple kind clusters locally, you’ll have routable pod IPs assuming that they can run on the same Docker network which is normally the case.

#So, what else is new?#
Our focus for the K8ssandra Operator v1.1 was the ability to restore Medusa backups from one cluster to another. Here’s a quick list of the changes this remote restore support involves, plus a few other enhancements v1.1 brings to your K8ssandra clusters.

- Remote restore with Medusa (feature)
- New Custom Resource Definitions (CRDs)
 - MedusaBackup
 - MedusaBackupJob
 - MedusaRestoreJob
 - MedusaTask
- Purging backups
- Medusa CLI compiled in the Docker image
- Improvements around adding a DC to an existing cluster (bug fix)
- Configure Java garbage collection properties (bug fix)

For a deeper dive into each enhancement, head over to the [K8ssandra Operator v1.1 release announcement](https://k8ssandra.io/blog/announcements/release/k8ssandra-operator-v1-1-release/). If you’re ready to upgrade to K8ssandra-operator v1.1, see our [installation documentation](https://docs-v2.k8ssandra.io/install/).

#Conclusion#
This post introduced you to the latest upgrades to the K8ssandra Operator! Stay tuned for an upcoming YouTube workshop that will take a deeper dive into the Dos and Don’ts of using the K8ssandra Operator to deploy Apache Cassandra Databases on Multi-Cluster Kubernetes.

For more workshops on Cassandra, check out [DataStax’s Academy on GitHub](https://github.com/DataStax-Academy) and our [DataStax Devs YouTube channel](https://www.youtube.com/channel/UCqA6zOSMpQ55vvguq4Y0jAg), where we regularly hold live workshops.

If you have any specific questions about Cassandra, join the [DataStax Community](https://community.datastax.com/index.html) and get answers from the experts. Lastly, follow the [DataStax Tech Blog](https://datastax.medium.com/?utm_source=datastaxmedium&utm_medium=blog&utm_campaign=kubecon-eu-2022&utm_term=backend-devplay&utm_content=new-release-updates-k8ssandra-M191a) here on Medium for more developer stories.

#Resources#
1. [Apache Cassandra](https://cassandra.apache.org/_/index.html)
1. [Astra DB](https://astra.dev/3wPWDRB)
1. [K8ssandra](https://k8ssandra.io/)
1. [Kubernetes](https://kubernetes.io/)
1. [K8ssandra Documentation](https://docs-v2.k8ssandra.io/install/)
1. [K8ssandra v1.1 release blog post](https://k8ssandra.io/blog/announcements/release/k8ssandra-operator-v1-1-release/)
1. [GitHub: K8ssandra Workshop](https://github.com/datastaxdevs/workshop-k8ssandra)
1. [How We Built the DataStax Astra DB Control Plane](https://thenewstack.io/how-we-built-the-datastax-astra-db-control-plane/)
1. [DataStax Community Platform](https://community.datastax.com/index.html)
1. [DataStax Academy](https://github.com/DataStax-Academy)
1. [DataStax Certifications](https://www.datastax.com/dev/certifications)
1. [DataStax Workshops](https://www.datastax.com/workshops)