Secure lifecycle management for OpenBao on Kubernetes.
Quick Start • Installation • Compatibility • Documentation • Contributing
Warning
Pre-GA Release: OpenBao Operator is intended for real deployments, but the CRD API remains v1alpha1, minor releases may introduce breaking changes, and support is best-effort for the latest stable line only. For production, use the Hardened profile, keep admission enforcement enabled, pin explicit versions, and validate upgrades in staging.
OpenBao Operator is a Kubernetes operator for OpenBao that automates lifecycle management: provisioning, TLS, backups/restores, upgrades, horizontal read scaling, and multi-tenancy controls.
Full documentation is available at dc-tec.github.io/openbao-operator.
Recommended entry points:
For full details, see the Compatibility Matrix.
- Kubernetes: requires
v1.33+; release validation runs onv1.34–v1.36 - OpenBao: primary validation on
2.6.2, with config compatibility checks for2.4.4,2.5.5, and2.6.2 - Support posture: best-effort support for the latest stable release line
OpenBaoCluster: Deploy and operate an OpenBao cluster (TLS, unseal, backups, upgrades).OpenBaoRestore: Restore a cluster from a backup (separate controller).OpenBaoTenant: Multi-tenant provisioning flow (multi-tenant mode).
- Two-Controller Architecture: Separate controller and provisioner components with least-privilege RBAC boundaries.
- Security Profiles with Guardrails:
DevelopmentvsHardened, enforced by admission policies to prevent insecure combinations. - Self-Init + OIDC Bootstrap: OpenBao self-initialization, with optional JWT/OIDC bootstrap via
spec.selfInit.oidc.enabled. - TLS, Your Way: Operator-managed TLS with rotation, external TLS, and ACME mode where OpenBao owns certificates (with ACME challenge Service support).
- Streaming Raft Backups: Snapshot streaming to S3/GCS/Azure with retention controls (no local staging).
- Declarative Restores: Restore workflows via
OpenBaoRestorewith operation locking and safe overrides. - Safe Upgrades: Rolling and blue/green upgrade strategies, including pre-upgrade snapshots.
RollingUpdateis the default recommended strategy. - Horizontal Read Scaling: Steady-state read replicas as non-voters, with a dedicated read Service and a shared primary endpoint that can include read replicas.
- Multi-Tenancy: Namespace-scoped tenancy model with policy enforcement via
OpenBaoTenant. Multi-tenant mode is the default and recommended production operating model.
- Threat model: Design assumptions and attacker model (Threat Model)
- RBAC boundaries: Least-privilege split between controller and provisioner (Tenant Boundaries)
- Guardrails: Validating admission policies that block dangerous settings before they reach the cluster (Admission Policies)
- Multi-tenancy: Namespace isolation guarantees and limits (Tenant Boundaries)
Install and verify the operator before continuing. If it is not running, complete Installation first. The next move depends on the tenancy mode you chose:
- Multi-tenant (default): Create the target namespace, onboard it through
OpenBaoTenant, then apply the firstOpenBaoCluster. - Single-tenant: Skip
OpenBaoTenantand create the firstOpenBaoClusterdirectly in the controller's watched namespace.
# cluster.yaml
apiVersion: openbao.org/v1alpha1
kind: OpenBaoCluster
metadata:
name: my-cluster
namespace: openbao-demo
spec:
version: "2.6.2"
replicas: 1
profile: Development
tls:
enabled: true
mode: OperatorManaged
storage:
size: "10Gi"kubectl create namespace openbao-demo
# Default multi-tenant mode only: onboard the target namespace first.
# Single-tenant mode: skip this OpenBaoTenant and apply cluster.yaml
# directly in the controller's watched namespace instead.
kubectl apply -f - <<'EOF'
apiVersion: openbao.org/v1alpha1
kind: OpenBaoTenant
metadata:
name: openbao-demo
namespace: openbao-demo
spec:
targetNamespace: openbao-demo
EOF
kubectl -n openbao-demo wait \
--for=condition=Provisioned \
openbaotenant/openbao-demo \
--timeout=2m
kubectl apply -f cluster.yaml
# Wait for the cluster, then inspect its Pods.
kubectl -n openbao-demo wait \
--for=condition=Available \
openbaocluster/my-cluster \
--timeout=10m
kubectl -n openbao-demo get pods -l openbao.org/cluster=my-clusterIf spec.selfInit.enabled is false (default), the operator stores a root token in Secret/openbao-demo/my-cluster-root-token (key: token).
kubectl -n openbao-demo get secret my-cluster-root-token -o jsonpath='{.data.token}' | base64 -d; echoThe default production path is:
- Multi-tenant mode
- Target namespace onboarded through
OpenBaoTenantbefore the first cluster Hardenedprofilespec.selfInit.enabled: truespec.tls.mode: ExternalorACMEspec.upgrade.strategy: RollingUpdate- Admission policies enabled
The Hardened profile enforces:
- External/ACME TLS (
spec.tls.mode) - External unseal (
spec.unseal.type) - Self-init enabled (
spec.selfInit.enabled: true)
Start with:
- Deployment Decision Guide
- Operator Installation
- Onboard the Target Namespace
- Create Your First Cluster
- Security Profiles
- Production Checklist
- Production samples in
config/samples/production/
Install the operator from our OCI registry.
# 1. Create namespace
kubectl create namespace openbao-operator-system
# 2. Install/upgrade chart
helm upgrade --install openbao-operator oci://ghcr.io/dc-tec/charts/openbao-operator \
--version <chart-version> \
--namespace openbao-operator-systemIf you install the operator into a custom namespace, replace openbao-operator-system consistently in the install, verification, and uninstall commands.
Find the chart in Artifact Hub (indexing may lag shortly after releases): Artifact Hub search: openbao-operator
Apply a pinned release manifest directly.
kubectl apply -f https://github.com/dc-tec/openbao-operator/releases/download/X.Y.Z/install.yamlReplace X.Y.Z with the exact release you intend to run. Use latest only for throwaway evaluation, not for production installs.
helm uninstall openbao-operator --namespace openbao-operator-systemkubectl delete -f https://github.com/dc-tec/openbao-operator/releases/download/X.Y.Z/install.yamlNote
The operator installation includes CRDs. If you want to remove CRDs as well, delete the openbao.org/* CRDs after uninstalling (this will delete all custom resources).
We welcome contributions! Please see the Contributing Guide for details on:
- Setting up your development environment.
- Running the PR-equivalent local gate (
devenv testfollowed by theoperator:bootstrap,operator:doctor, andoperator:ci-coreDevenv tasks). - Our AI-Assisted Contribution Policy.
Apache-2.0. See LICENSE.