How to run Cassandra and Kubernetes together

How to run Cassandra and Kubernetes together

There are three steps. First, we need to run a kubectl command which references a YAML config file. The next kubectl command applies a YAML configuration that defines the storage settings to use for Cassandra nodes in a cluster. Finally, using kubectl again, we apply YAML that defines our Cassandra Datacenter.

Containers have become increasingly popular for developers who want to deploy applications in the cloud. To manage these new applications, Kubernetes has become a de facto standard for container orchestration. Kubernetes enables developers to build distributed applications that automatically scale elastically, depending on demand.

Kubernetes was developed to effortlessly deploy, scale, and manage stateless application workloads in production. When it comes to stateful, cloud-native data, there has been a need for the same ease of deployment and scale.

Also on InfoWorld: Where site reliability engineering meets devops ]

In distributed databases, Cassandra is appealing for developers that know they will have to scale out their data — it provides a fully fault tolerant database and data management approach that can run the same way across multiple locations and cloud services. As all nodes in Cassandra are equal, and each node is capable of handling read and write requests, there is no single point of failure in the Cassandra model. Data is automatically replicated between failure zones to prevent the loss of a single instance affecting the application.

Connecting Cassandra to Kubernetes

The logical next step is to use Cassandra and Kubernetes together. After all, getting a distributed database to run along with a distributed application environment makes it easier to have data and application operations take place close to each other. Not only does this avoid latency, it can help improve performance at scale.

To achieve this, however, means understanding which system is in charge. Cassandra already has the kind of fault tolerance and node placement that Kubernetes can deliver, so it is important to know which system is in charge of making the decisions. This is achieved through using a Kubernetes operator.

Operators automate the process of deploying and managing more complex applications that require domain-specific information and need to interact with external systems. Until operators were developed, stateful application components like database instances led to extra responsibilities for devops teams, as they had to undertake manual work to get their instances prepared and run in a stateful way.

There are multiple operators for Cassandra that have been developed by the Cassandra community. For this example, we’ll use cass-operator, which was put together and open-sourced by DataStax. It supports open-source Kubernetes, Google Kubernetes Engine (GKE), Amazon Elastic Kubernetes Service (EKS), and Pivotal Container Service (PKS), so you can use the Kubernetes service that best suits your environment.

kubernetes

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

50+ Useful Kubernetes Tools for 2020 - Part 2

Our original Kubernetes tool list was so popular that we've curated another great list of tools to help you improve your functionality with the platform.

Kubernetes in the Cloud: Strategies for Effective Multi Cloud Implementations

This article explains how you can leverage Kubernetes to reduce multi cloud complexities and improve stability, scalability, and velocity.

Kubernetes vs Docker

Get Hands-on experience on Kubernetes and the best comparison of Kubernetes over the DevOps at your place at Kubernetes training

Typical flow for deploying applications to Kubernetes

Get Hands-on experience on Kubernetes and the best comparison of Kubernetes over the DevOps at your place at Kubernetes training

Microsoft Announces General Availability Of Bridge To Kubernetes

Microsoft announced the general availability of Bridge to Kubernetes, formerly known as Local Process with Kubernetes.