Chapter 5. Automating Database Management on Kubernetes with Operators

In this chapter, we’ll continue our exploration of running databases on Kubernetes, but shift our focus from installation to operations. It’s not enough just to know how the elements of a database application map onto the primitives provided by Kubernetes for an initial deployment. You also need to know how to maintain that infrastructure over time in order to support your business-critical applications. In this chapter, we’ll take a look at the Kubernetes approach to operations so that you can keep databases running effectively.

Operations for databases and other data infrastructure consist of a common list of “day two” tasks, including the following:

  • Scaling capacity up and down, including reallocating workload across resized clusters

  • Monitoring database health and replacing failed (or failing) instances

  • Performing routine maintenance tasks, such as repair operations in Apache Cassandra

  • Updating and patching software

  • Maintaining secure access keys and other credentials that may expire over time

  • Performing backups, and using them to restore data in disaster recovery

While the details of how these tasks are performed may vary among technologies, the common concern is how we can use automation to reduce the workload on human operators and enable us to operate infrastructure at larger and larger scales. How can we incorporate the knowledge that human operators have built up around these tasks? While ...

Get Managing Cloud Native Data on Kubernetes now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.