SchemaHero: Declarative Database Schema Management for Kubernetes
Shriira Press
Declare the table you want, and let Kubernetes plan and apply the migration for you.
Welcome to SchemaHero: Declarative Database Schema Management for Kubernetes.
SchemaHero is a CNCF sandbox project that reimagines database schema migrations as a declarative, Kubernetes-native problem. Instead of hand-writing and sequencing ordered migration scripts that must stay compatible across every environment your application runs in, you describe the table you want — its columns, types, keys, and indexes — in a custom resource, and SchemaHero's operator works out the difference against the live database and generates the SQL to close the gap. This book starts with the problem that ordered migrations create, then builds up the architecture: the operator, the Database, Table, and Migration custom resources, and the plan-approve-apply workflow that lets you review generated DDL before it touches production. From there we cover modeling real schemas, handling changes and drift, working across Postgres, MySQL, and the other engines SchemaHero supports, and finally how it fits a GitOps practice alongside the rest of the cloud-native ecosystem. It is written for engineers who manage databases and want their schema to live in version control like the rest of their infrastructure.
This title is part of the ShriIra library and is free to read in full, right here — our small contribution to making world-class knowledge easy to reach.
A note on reading it: open the Contents menu at the top of the reader to jump between chapters, use the Aa menu to set a comfortable text size, theme (light, sepia, or night), and single- or two-page layout. Your place is saved automatically, so you can always pick up where you left off.
We hope it serves you well.
— Shriira Press