Last May, KubeCon gathered multiple tech enthusiasts, students, professionals, and companies. The event highlighted various topics and insights on how to collaborate on pushing the boundaries of cloud-native computin
One of our Engineering Directors, Mykola Marzhan, shared his knowledge about databases on Kubernetes at KubeCon, during a session organised by the DoK.Community.
Organisations want to build and run scalable database applications in public, private and hybrid environments. There are multiple pros and cons to running database applications in Virtual Machines (VMs), Database as a Service (DBaaS) and Kubernetes. Versus VMs and DBaaS, running a database on Kubernetes has benefits in portability, avoiding vendor lock-in, DevOps friendliness, scalability and cost-effectiveness
Today, most organisations want to run databases as a stateful workload. Kubernetes can cater for this requirement.
Charmhub.io has published multiple database operators (called charms) that run on Kubernetes, including Redis, Cassandra, PostgreSQL, etc. A charm is a database operator running in Kubernetes as an application package with all the operational knowledge required to install, maintain and upgrade it on a Kubernetes cluster. A charm can also integrate with other applications and charms.
Organisations deploy multiple applications for their business operations, often including databases. Deploying database clusters faster and confidently is necessary for an organisation’s technological landscape. Having a production-ready and automated setup helps you improve the customer experience and mitigate operational risks.
Consider this checklist before running production database workloads on Kubernetes:
The database should be highly available, as this is usually pretty important for the organisation’s continuity. High Availability (HA) is a system characteristic that aims to ensure an agreed level of operational performance, typically uptime, during a standard period. Therefore, the right design and implementation of HA is critical for organisations and should be a key focus area.
In order to consider a database production-ready, it must also have a strategy for achieving a defined Recovery Point Objective (RPO) and Recovery Time Objective (RTO). Such strategy should include automatic failover without data loss with switching traffic from old primary to new primary, automation of a one-member and full-cluster crash recovery, cross-region and/or cross-cluster replication, health and readiness checks, etc.
A database can hold confidential, sensitive, or protected information, making it a prime target for cyberattacks. Therefore, the basic security requirement such as user authentication and authorisation is essential and should be enabled by default. In addition, semi-automatic updates, network security, encryption in transit and encryption at rest can be implemented.
Deployment readiness is also vital for database production. There are multiple considerations here: schema setup, vertical and horizontal scalability, ability to deploy offline, database plugins, customisation and configuration of the database, various versions support, local storage support and many more. Learn more by watching Mykola’s talk.
This section was not mentioned in the talk but is very important for any production database cluster to implement backup and restore. Here is the list to consider:
A production database should be monitored appropriately. This can be implemented by having logs, query analytics, host and database metrics. In addition, appropriate alerting rules and notification channels must be in place.
Canonical develops multiple open-source operators so developers can confidently and efficiently run databases on Kubernetes in a production environment. These products are featured on Charmhub.io. Canonical also offers two CNCF-certified Kubernetes distributions: Charmed Kubernetes and MicroK8s, which help simplify and accelerate the deployment of Kubernetes.
Running database clusters in public, private and hybrid environments gives you multiple benefits. Kubernetes provides the additional advantages of portability, no vendor lock-in, DevOps friendliness, scalability and cost-effectiveness.
If you want to delve deeper into this topic, watch Mykola’s talk on YouTube.
2024 was the GenAI year. With new and more performant LLMs and a higher number…
Canonical’s Kubernetes LTS (Long Term Support) will support FedRAMP compliance and receive at least 12…
Welcome to the Ubuntu Weekly Newsletter, Issue 878 for the week of February 2 –…
At Canonical, we firmly believe that delivering an outstanding, customer-centric support experience is impossible without…
I want to share how to install osTicket v1.14 for Ubuntu 20.04 server. osTicket written…
Now I want to share how to install WordPress on ubuntu 20.04 server. WordPress is…