


There are operators for most popular databases, such as the Zalando Postgres-operator, or Cass-operator, which the Apache Cassandra community has recently banded around. When selecting an operator, you’ll want to make sure it’s open-source, and also check how actively it’s maintained. You can find a wide variety of operators for databases and other applications at the OperatorHub. If you intend on running more than a small handful of nodes of your selected database, you’ll benefit from automating your operations by using a K8s Operator. For example, here’s a tutorial on running Apache Cassandra on OpenEBS, a popular open-source storage provider for K8s that you can run in a variety of environments.
#Metabase kubernetes how to
You’ll likely be able to find sample code that shows how to configure your selected database to use your chosen storage provider. These include a number of options for managing both local and networked storage, in formats such as block, file, and object storage. You can find a thriving ecosystem of K8s providers in the Cloud-Native Storage category of the CNCF Landscape.įigure 3: Cloud Native Storage projects on the CNCF Landscape as of September 2021. However, there are many other options that are cloud-vendor independent. If you’re using one of the public clouds, you’ll have storage options available such as Elastic Block Storage (EBS) volumes in AWS. Unless the database you choose is just a cache holding ephemeral data, you’ll need to configure your database to use persistent storage. Note that your needs may also change as your application evolves. Deployment topology: will your application be running in on-premises data centers, public clouds, or a mix of both?ĭeciding on a database isn’t entirely independent from other decisions in your application design, and we’ll see more of this below.Capacity, performance, and scalability requirements: will your data fit on a single node, or will you need a distributed database that can scale as your application grows?.Database language: does your application need SQL, NoSQL, developer-friendly data APIs?.To help you make the right choice, consider the following factors: To start, you’ll want to think about what kind of database your application needs.

Once you’ve familiarized yourself with the basic building blocks of Kubernetes, there are three main considerations when setting up the right database for your application. We’re also building a collection of examples on GitHub in association with the book project and would love to see your issues and pull requests. We can deploy them like any other K8s application and take advantage of resources that it provides: StatefulSets, Services, StorageClasses, PersistentVolumes, and PersistentVolumeClaims, and more.įigure 2: Simple deployment of Cassandra on Kubernetes using a StatefulSet.įor more great examples of using these primitives online, check the reference example in the Kubernetes documentation of deploying Cassandra using StatefulSets. Simply put: databases are just applications composed of compute, network, and storage. You can learn more about them during my talk, as well as in the upcoming O’Reilly book: Managing Cloud Native Data on Kubernetes. In the meantime, this blog post dives into the key steps of deploying databases and stateful workloads in K8s. If you’d like to join me at this year’s KubeCon, either virtually or in-person, register here. This blog is a sneak preview of my upcoming talk, which will take place in Los Angeles and streamed online this October 12. Basically, it boils down to a few key steps: How do you deploy a database? Where is the actual storage? How is the storage mapped to the database or the application using it?Īt KubeCon North America 2021, I’ll be giving a talk on “ How to put a database in Kubernetes” where I demystify the deployment of databases and stateful workloads in K8s. The idea of running a stateful workload in Kubernetes (K8s) can be intimidating, especially if you haven’t done it before. Learn the key steps of deploying databases and stateful workloads in Kubernetes and meet the cloud-native technologies, like K8ssandra, that can streamline Apache Cassandra for K8s.
