VOOZH about

URL: https://thenewstack.io/how-to-stop-worrying-and-start-loving-databases-on-kubernetes/

⇱ How To Stop Worrying and Start Loving Databases on Kubernetes - The New Stack


TNS
SUBSCRIBE
Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more about at-scale software development.
REQUIRED
It seems that you've previously unsubscribed from our newsletter in the past. Click the button below to open the re-subscribe form in a new tab. When you're done, simply close that tab and continue with this form to complete your subscription.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.
Welcome and thank you for joining The New Stack community!
Please answer a few simple questions to help us deliver the news and resources you are interested in.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Great to meet you!
Tell us a bit about your job so we can cover the topics you find most relevant.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Welcome!

We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.

What’s next?

Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.

Follow TNS on your favorite social media networks.

Become a TNS follower on LinkedIn.

Check out the latest featured and trending stories while you wait for your first TNS newsletter.

PREV
1 of 2
NEXT
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
Thanks for your opinion! Subscribe below to get the final results, published exclusively in our TNS Update newsletter:
NEW! Try Stackie AI
From clobbered drafts to real-time sync
Apr 14th 2026 10:00am, by David Moore
TypeScript 6.0 RC arrives as a bridge to a faster future
Mar 14th 2026 9:00am, by Darryl K. Taft
Mastra empowers web devs to build AI agents in TypeScript
Jan 28th 2026 11:00am, by Loraine Lawson
2024-10-23 14:00:56
How To Stop Worrying and Start Loving Databases on Kubernetes
sponsor-cncf,sponsored-post-contributed,
Databases / Kubernetes / Storage

How To Stop Worrying and Start Loving Databases on Kubernetes

If running databases on Kubernetes creates anxiety, you’re doing it wrong. Learn how to create a robust and resilient data layer with K8s.
Oct 23rd, 2024 2:00pm by Greg Nokes
👁 Featued image for: How To Stop Worrying and Start Loving Databases on Kubernetes
Featured image by Clem Onojeghuo on Unsplash.
CNCF sponsored this post.

Kubernetes (K8s) has undeniably transformed deployment and management for applications. It is a cornerstone of cloud native architecture. Modern DevOps teams use Kubernetes for orchestration of high-availability pods, multizone failover and distribution of load across data centers for applications.

Yet, when it comes to running databases on Kubernetes, many teams still hesitate. The skepticism isn’t unfounded; Kubernetes was once considered the wrong choice for stateful applications due to concerns about storage persistence, data integrity and operational complexity. Databases on Kubernetes were looked at similarly to BASE jumping, but for DevOps.

Luckily, times have changed. Kubernetes has improved. The Kubernetes ecosystem has grown. Once seen as daring, stateful Kubernetes Operators are now mature and robust. However, all implementations are not equal. So, let’s delve into the critical considerations for running a database on Kubernetes.

Rise of the Operator Pattern

Kubernetes uses the term “Operator Pattern” to define an algorithm for managing stateful workloads. In implementations it may be referred to as “Operator” or “Kubernetes Operator” or “Kubernetes database operator.” Simply put, a Kubernetes Operator is a codebase that encapsulates operational knowledge into automation tasks that manage stateful deployments on Kubernetes. The automation tasks include initialization of high availability, running backups, restore backups, health checks and failover.

A GitHub search will return multiple Kubernetes Operators for any database. With choices between multiple operators and implementation of Kubernetes, any two teams running databases on Kubernetes may have significant differences in their happiness.

The best Kubernetes Operators have the longest running time-in-production on stressed environments. The experience gained over time cannot be understated. Experience is how the daring found edge cases and wrote code that operationalizes it. Finding a new edge case on a Kubernetes Operator in a production deployment will shake confidence in the system. Thus, look for a Kubernetes Operator who can handle the nuances of the database and has a strong record of time in production.

Essentials of Database Management on Kubernetes

Starting a database in a container is simple. Operating a production database ensuring data integrity, availability and performance requires a checklist. Consider the following when choosing a Kubernetes Operator:

  • Backups: Data is the lifeblood of any organization. Regular and reliable backups are non-negotiable. In a Kubernetes environment, integrating backup solutions with object storage services, like Amazon S3, can offer scalable and durable storage options. Automated backup schedules, encryption and restoration processes are features to look for in a robust backup strategy.
  • Monitoring: Visibility into a database’s performance is crucial for preempting issues. Kubernetes provides tools like Prometheus and Grafana for monitoring. Additionally, the database should expose its own metrics that are meaningful and actionable. These metrics should cover aspects like query performance, resource utilization and latency.
  • Disaster recovery: Disaster recovery planning ensures that you have a plan for restoring services in the event of catastrophic failures. Kubernetes’ ability to manage workloads across clusters can be leveraged for effective disaster recovery strategies. Organizations should routinely test recovery procedures.
  • High availability: Downtime is costly (financially and reputationally). Kubernetes shines when deploying high-availability environments, thus preventing single points of failure. Kubernetes supports this through StatefulSets and ReplicaSets, enabling the running of multiple instances of a database that can take over seamlessly if one fails.
  • Connection scaling: As a user base grows, so does the demand on database connections. Kubernetes excels at scaling stateless applications, but databases require thoughtful connection-scaling strategies. Connection pooling and horizontal scaling of read replicas are a tool to mitigate increasing loads without degrading performance.

Cloud Native Considerations

This checklist has been around as long as databases themselves. Framing the checklist with respect to cloud native principles changes the thought model a bit. Complexity is introduced, but that also creates opportunities.

  • Disk storage solutions: Spend time to build an understanding of Kubernetes’ storage architecture. If choices to configure compute are linear, then choices to configure storage are a matrix. StatefulSets manage persistent volumes, but selecting the right storage class affects performance and availability. Additional considerations include factors like input/output per second (IOPS), latency and redundancy when choosing storage solutions for your database. When running databases on Kubernetes, it’s not unrealistic to spend the most time planning for storage needs.
  • Backups and object storage: While the “storage” above refers to performance for the files in active use by a database, object storage is a place for backups and transaction logs. Integrating backups with object storage services decreases costs and empowers data durability. Production use requires the Kubernetes database operators to support seamless integration with modern object storage.
  • Ease of use and scalability: Kubernetes’ strength is scaling applications effortlessly. Modern Kubernetes database operators enable easy scaling up (vertical scaling), scaling out (horizontal scaling) and scaling down (during low-traffic periods). Automation through Kubernetes Operators simplifies these events into standardized configurations and API calls.
  • Upgrades and maintenance: Running updates and maintenance should feel routine. Kubernetes Operators facilitate rolling updates, which minimizes downtime during upgrades. Ease of automation reduces the costs of testing using canary deployments. These tests reduce risks traditionally associated with updating critical database systems.

Running Databases on Kubernetes Is a Known Path

Running a database on Kubernetes should not be a source of anxiety — if it is, go a different route. The right tools and implementations create a robust and resilient data layer for your applications.

The good news is the path is a known path, and it has been paved with code that points the way. By embarking on this journey with mature Operators, teams will build on the success of prior experience. The goal is clear: let a Kubernetes Operator take care of the databases; deliver value to users through innovative applications.

Interested in learning more about Kubernetes Operators? Stop by the Crunchy Data booth P8 at KubeCon + CloudNativeCon North America Nov. 12 – 15 to speak with an expert or see a demo.

To learn more about Kubernetes and the cloud native ecosystem, join us at KubeCon + CloudNativeCon North America, in Salt Lake City, Utah, on Nov. 12-15, 2024.

The Cloud Native Computing Foundation (CNCF) hosts critical components of the global technology infrastructure including Kubernetes, OpenTelemetry, and Argo. CNCF is the neutral home for cloud native collaboration, bringing together the industry’s top developers, end users, and vendors.
Learn More
The latest from CNCF
TRENDING STORIES
Greg Nokes is a seasoned technology leader with over two decades of experience spanning product management, technical architecture, technical sales and network engineering. Currently at Crunchy Data, he leverages his extensive expertise to enhance Postgres deployments on Kubernetes. Previously, as...
Read more from Greg Nokes
CNCF sponsored this post.
SHARE THIS STORY
TRENDING STORIES
AWS is also a sponsor of The New Stack.
TNS owner Insight Partners is an investor in: Simply.
SHARE THIS STORY
TRENDING STORIES
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.