Kubernetes Operator
When running SchemaHero as a Kubernetes operator, you can use kubectl schemahero commands to interact with the operator and manage schema migrations.
Prerequisites
- SchemaHero operator installed in your cluster (see install)
kubectlconfigured to access your clusterkubectl-schemaheroplugin installed
Available Commands
| Command | Description |
|---|---|
| install | Install the SchemaHero operator |
| get tables | List tables managed by SchemaHero |
| get migrations | List pending and applied migrations |
| describe migration | Show details of a specific migration |
| approve migration | Approve a pending migration |
| reject migration | Reject a pending migration |
| shell | Open a database shell |
Workflow
The Kubernetes operator workflow differs from the CLI workflow:
- Deploy Table resources - Apply Table manifests to your cluster
- Review migrations - The operator generates Migration resources
- Approve or reject - Use
kubectl schemahero approveorreject - Operator applies - Approved migrations are executed automatically
For most use cases, we recommend the CLI workflow with schemahero plan and schemahero apply for simpler, more predictable deployments.