OpenBao HA with integrated Raft storage on Kubernetes

A three or five pod OpenBao Raft cluster on Kubernetes needs deliberate decisions on storage, node identity, auto-unseal and service routing before the first Helm install. This page covers what the cluster does, how to configure it and what to confirm.

On this page

How OpenBao HA with Raft on Kubernetes works and when to use it

Raft gives an OpenBao cluster high availability without an external database, so the choice you face is whether a three or five pod Raft cluster on Kubernetes meets your recovery needs better than a PostgreSQL backend. In OpenBao's HA model, one node is active and holds a lock in the data store, while standby nodes forward or redirect client requests to it. Integrated storage (Raft) and PostgreSQL are the two backends the project officially supports for HA. With Raft, each pod stores its own copy of the replicated data on a persistent volume, and the pods form a consensus group. Losing one pod leaves a quorum intact, so the cluster keeps serving requests. Losing a majority stops writes until quorum returns, which is why an odd member count matters.

Teams typically choose Raft when they want OpenBao's state to live inside the cluster it protects, with fewer moving parts to back up and upgrade than a separate database. The Helm chart drives this through the server.ha.raft values block, and each pod needs a stable identity that survives rescheduling, which the StatefulSet supplies. Confirm the exact keys and the chart version you deploy against the official chart documentation, since defaults change between releases. Teams that already run a managed or well-operated PostgreSQL service may prefer that backend, because the OpenBao storage documentation describes PostgreSQL as easier to operate safely than Raft.

Since OpenBao 2.5.0, Raft standbys can serve read-only operations, and v2.7.0 extended that capability to PostgreSQL. Read scaling is a documented benefit, but it does not change where writes go, so plan your load balancing and client expectations around the active node. Review the OpenBao high availability documentation before fixing your topology, and confirm with your platform team how pod anti-affinity, zone spread and persistent volume classes will map to your Kubernetes cluster.

How the Raft pods, Kubernetes services and unseal path fit together

The diagram starts with clients sending requests to the Kubernetes service that routes to the active OpenBao pod. The active node holds the lock in integrated Raft storage, and standby pods in the same StatefulSet replicate that data over Raft peer connections and forward or redirect requests. Each pod contacts the external auto-unseal key service after a restart, so a rescheduled pod can rejoin without an operator entering unseal keys. Check that every pod has a stable node ID, that the standby service returns the expected peers, and that the unseal dependency is reachable from every node.

Clients reach the active pod, which replicates Raft data and depends on an external unseal key service.

Which server.ha.raft settings matter and when each fits

This table compares the Helm values that shape an OpenBao Raft cluster on Kubernetes, from member count and node IDs to auto-unseal and service registration. Read each row as a decision: the setting, what it controls, and when the choice fits. Confirm every key name against the chart version you deploy, because chart values and the embedded server configuration change between releases.

SettingWhat it controlsWhen it fits
server.ha.raft.enabledTurns on integrated Raft storage instead of an external backend for the podsChoose it when you want no separate database to operate for OpenBao storage
Replica count of threeRaft quorum of two out of three members, tolerating the loss of one podFits most single-cluster deployments where one pod can be drained or rescheduled at a time
Replica count of fiveRaft quorum of three out of five members, tolerating the loss of two podsFits when you need to survive two simultaneous pod or node losses, or planned maintenance on one node during an outage
raft config and retry_joinPeer discovery so new pods join the existing cluster by addressUse the chart's default join pattern for the Kubernetes service DNS names, and confirm the stanza matches your chart version
node_id per podA stable identity for each Raft member so a rescheduled pod keeps its place in the clusterDerive it from the pod name in the StatefulSet, so each ordinal maps to one fixed member
Auto-unseal seal stanzaHow pods unseal after restart or rescheduling without an operator entering key sharesChoose a cloud KMS or HSM seal when pods must recover unattended; keep Shamir unseal for small labs or where key ceremonies are required
Service registration (Kubernetes)Labels pods as active or standby so the active service routes client traffic correctlyEnable it when clients should reach only the active node through a stable service name

Setting up the Raft cluster from the Helm chart

This sequence takes a three or five pod OpenBao Raft cluster from empty namespace to a verified state, where one pod is active, the rest are standbys, and the Kubernetes services route traffic to the right pod. Each step closes with a check you can run before moving on.

  1. Prepare storage classes and pod anti-affinity

    The platform team confirms that the cluster has a storage class that provisions a persistent volume for each replica, and that the nodes are spread across failure domains such as zones or racks. Each OpenBao pod needs its own volume for Raft data, so a shared or ephemeral volume defeats the purpose of the cluster. Plan the pod anti-affinity rules so that no two replicas land on the same node. Confirm the zone labels with a node listing and check that the storage class reports a binding mode you expect. The step is done when you can name the storage class and the failure domain label that the chart's anti-affinity setting will use.

  2. Write the server HA Raft values

    The engineer writes a values file that sets server.ha.enabled to true, sets server.ha.replicas to three or five, and enables server.ha.raft with a storage block and a multi-line configuration. Each node needs a unique node_id in the retry_join stanza, which the chart fills from the pod name when you use the templated form documented for the chart. Remove any disable_mlock setting, because OpenBao stopped using mlock in 2.0.0. Check the rendered configuration with a template command and confirm that every replica receives a distinct node ID and the same cluster address list. The step closes when the rendered ConfigMap shows the expected replica count and node IDs.

  3. Configure auto-unseal for pod recovery

    Without auto-unseal, every pod that is rescheduled comes back sealed and waits for a person to supply key shares. The security or platform team selects a seal method that the cluster can reach, such as a cloud KMS, a transit seal on another OpenBao cluster, or an HSM, and adds the matching seal stanza to the same configuration block. Store any credentials the seal needs in a source you control, not in the values file. Confirm the seal method with the vendor documentation for your chosen backend before you rely on it. The step is done when the seal stanza renders correctly and you know which system must be reachable for a pod to unseal after a restart.

  4. Run the install with dry run first

    The engineer runs the Helm install or upgrade with the dry-run flag against the target namespace and reviews the output before any object is created. The review covers the StatefulSet replica count, the volume claim templates, the anti-affinity rules, the service definitions, and the injected configuration. Compare the rendered manifests with the chart version you pinned, and fail the change if the output differs from the plan. Run the real install only after the diff is clean. The step is done when the dry-run output matches the reviewed plan and the change record references the chart version and values file hash.

  5. Initialize the first node

    After the pods start, the operator runs the initialize command against the first pod only. The command returns the recovery material and root token, which the operator stores in the approved secret custody process at once, with no copies in chat or tickets. If auto-unseal is configured, the first pod unseals itself using the seal backend. Confirm the pod reports as initialized and unsealed with the status command, and check that the root token is not written to any file in the repository. The step is done when the first node reports initialized and unsealed and the recovery material is held by the named custodians.

  6. Confirm the remaining peers join the cluster

    The other replicas use retry_join to contact the first node, join the Raft group, and receive a copy of the data. Check the join status on each pod and confirm that each one reports as unsealed and healthy. Then list the Raft peers from the active node and verify that the number of voters equals the replica count and that exactly one node is the leader. If a pod does not join, inspect its logs for certificate or address errors before retrying. The step is done when the peer list shows every expected node as a voter and the cluster reports a single leader.

  7. Verify active and standby service selectors

    The chart creates a service that routes to the active node and a headless service for direct pod addressing. Check the active pod label, which should identify the current leader, and confirm that the active service endpoints contain only that pod. Send a read request through the standby service to confirm that standbys forward or redirect as the HA documentation describes for your version. Record which service a client should use for writes, and test that failover updates the label after you delete the leader pod in a test environment. The step is done when the active label matches the leader in the peer list and the endpoint check passes.

Why auto-unseal decides whether pods recover after rescheduling

A sealed OpenBao pod cannot serve requests, so the choice of unseal method decides whether the cluster heals itself when a pod restarts or the scheduler moves it to another node. With Shamir unseal, every pod that starts comes up sealed and waits for an operator to supply key shares. In a three or five pod Raft cluster, a node drain, a kernel upgrade or a crashed pod can therefore leave the active node with fewer peers than it needs, and a quorum of pods may stay unavailable until someone performs the ceremony. Auto-unseal through a supported seal is what lets each pod unseal itself on start, so recovery depends on Kubernetes and the Raft quorum rather than on a person being available.

The trade-off is key custody. With auto-unseal, the key that protects OpenBao's root key moves to an external KMS or HSM, and access to that seal becomes part of your availability and security boundary. If the pods lose network access to the seal, or the credentials they use to reach it are revoked or rotated without coordination, every pod stays sealed even though the Kubernetes objects look healthy. Shamir ceremonies remove that dependency but keep key custody with people, and they make recovery slower and more error-prone under pressure. Before choosing, confirm which seal your security team will accept, who administers it, and how a pod will reach it from each node you plan to use.

Seal options, their configuration keys and their failure modes are covered on the OpenBao unseal and key management guidance in this group, so this section does not compare them. Whatever seal you pick, test the failure path before go-live: drain a node, delete one pod, and confirm that the rescheduled pod unseals and rejoins the Raft peer set without manual steps. Record the procedure for the case where the seal is unreachable, because that is the scenario where auto-unseal stops helping.

Security controls for a Raft-backed OpenBao cluster

A Raft-backed OpenBao cluster holds the encrypted secret data, the Raft peer set and the keys that unseal it, so compromise of any one layer can expose everything. The cards below cover the controls to set and verify before the cluster takes production traffic, in roughly the order an attacker or an operator would reach them.

TLS between peers and clients

Raft peers replicate data over the cluster address, and clients reach the API over the listener. Both paths need TLS with certificates that name the pod DNS entries the chart creates, so one node cannot impersonate another. Check that tls_disable is not set on any listener and that cluster_addr uses the pod address. Ask whoever issues the certificates how rotation will happen without restarting the whole cluster.

OpenBao HA docs

Restricting snapshot and raft endpoints

The sys/storage/raft endpoints can take snapshots and manage peers, so a token with broad read access can copy the entire encrypted store. Bind these paths to a dedicated policy that only the snapshot agent and a small operator group can use. Review which tokens hold that policy every quarter, and confirm that a snapshot taken with one token cannot be restored by another without an explicit grant.

Protecting the root token and recovery keys

The initial root token and the recovery or unseal key shares are the highest-privilege material in the cluster. Split them among named custodians, store each share separately, and revoke the root token once admin policies and identity login work. Record every use of a recovery key in a ticket. Ask your team to confirm who can start a rekey operation, because that operation can change how the cluster is unlocked.

Pod security and network policy

OpenBao pods should run as non-root with a read-only root filesystem, no privilege escalation and dropped Linux capabilities, following the restricted profile in the Pod Security Standards. A NetworkPolicy should allow the Raft port only between OpenBao pods and the API port only from approved namespaces. Verify both with a test pod in a denied namespace, since a policy that silently allows all traffic is common.

Pod Security Standards

Backup encryption and access

Raft snapshots contain the encrypted data but are only one layer, so the storage bucket or volume that receives them needs its own encryption, access logging and retention rules. Confirm who can read and delete backup objects, since deletion removes your recovery path. Test a restore into an isolated cluster on a schedule, because an unrestorable snapshot is not a backup.

Seal provider credentials

Auto-unseal depends on credentials for a cloud KMS or other seal provider, and those credentials are often stored as a Kubernetes Secret that anyone with list access can read. Grant the seal key usage only to the OpenBao service account, scope it to one key, and enable key-use audit logs on the provider side. Ask the provider team how the credentials rotate and what happens to unsealing during a rotation.

Questions buyers ask about OpenBao Raft on Kubernetes

How much effort and time does an OpenBao Raft cluster on Kubernetes take?

The effort depends on how many decisions are still open when the work starts, not on the chart itself. The main drivers are the number of Kubernetes clusters involved, how many environments need their own cluster, whether the storage class and network policy are already defined, how the unseal key is protected, and how many applications will authenticate to OpenBao on day one. Teams with a settled cluster and an agreed KMS usually move faster than teams that must decide storage, TLS and recovery procedures first. Ask any partner for a written scope that lists each environment, the seal method, the TLS approach and the restore test. That list is what drives the quote and the schedule.

What does the work need from our team: storage, KMS access and a cluster?

Expect to provide four things before the build starts:

  • A Kubernetes cluster where OpenBao pods can be scheduled across separate nodes, with a storage class that gives each pod its own persistent volume.
  • Network paths between the OpenBao pods and between the pods and clients, plus a TLS certificate approach that your security team accepts.
  • An auto-unseal key in a cloud KMS or other supported seal, with an IAM role or equivalent that OpenBao can use without human keys.
  • Owners for backups, monitoring and change approval.

Confirm the exact seal options and their required permissions with the OpenBao documentation for your version, since these vary by provider.

Can our internal platform team build and run this without a partner?

Yes, if the team already runs stateful workloads on Kubernetes and has someone who understands secrets, certificates and recovery. The hard parts are not the Helm values but the operational decisions: how unseal keys are custody-controlled, how Raft snapshots are taken and tested, how a failed node is replaced, and how upgrades are sequenced across pods. A partner is most useful when the team needs those decisions documented for auditors or when it lacks capacity for a restore test. Whatever model you choose, make sure at least two people can perform a restore and an unseal drill without the original builder.

How do three-member and five-member Raft clusters differ?

A Raft cluster needs a majority of voting members to commit writes, so three members tolerate one unavailable member and five members tolerate two. The trade-off is more replication traffic, more volumes to manage and more pods to upgrade with a five-member layout. Raft requires an odd number of voters so that a majority is clear during a partition. For most single-site clusters, three members is the simpler starting point, and five members suit setups where two simultaneous failures or planned maintenance on one node would otherwise leave the cluster without quorum. Set the node IDs and retry join entries to match the number of replicas you choose.

Should we choose Raft or PostgreSQL as the storage backend?

Choose Raft when you want OpenBao to hold its own replicated storage inside the cluster and you can run the snapshot and restore procedures yourself. Choose PostgreSQL when your organization already operates a highly available database with tested backups and skilled administrators. The OpenBao storage documentation describes PostgreSQL as easier to operate safely than Raft, so teams without Raft experience should weigh that statement heavily. Raft also has no external database dependency to patch. Both are officially supported for HA, so the decision turns on your existing operational skills and recovery tooling, not on feature gaps.

What happens to OpenBao when a pod is rescheduled to another node?

When Kubernetes reschedules a pod, the pod keeps its node ID and persistent volume if the StatefulSet and storage are set up correctly, and it rejoins the Raft cluster as a standby. Without auto-unseal, the pod starts sealed and needs an operator to supply unseal keys before it serves requests, which blocks recovery during a node failure. With auto-unseal configured, the pod contacts the KMS on start and unseals itself. Test this by draining a node in a non-production cluster, confirming the pod returns unsealed, and checking that the active node and service routing are correct. Confirm the exact behavior for your OpenBao version in the high availability documentation.

Running and upgrading the Raft cluster over time

Day-two work on a Raft-backed OpenBao cluster is mostly about keeping the quorum healthy and proving that a backup can be restored. Watch the active node and the standby pods continuously, and alert on changes in the leader, on pods that stop reporting as healthy standbys, and on pods that fall out of the Raft peer set. A leader change on its own is not an incident, but repeated changes usually point to resource pressure, network instability between pods, or storage latency. Pair these alerts with OpenBao's telemetry so you can see the cause, not only the symptom. Confirm which metrics your OpenBao version exposes and how your monitoring stack scrapes the pods before you rely on them.

Snapshots are the backup you can actually restore, and the restore path is the part teams most often leave untested. Take Raft snapshots through the snapshot endpoint on a schedule, store them outside the cluster, and restore them into a separate test cluster at least on a regular cadence. Give the snapshot role only the minimal policy it needs on sys/storage/raft/snapshot, and record which unseal material and auth configuration a restored cluster will need. Keep the quorum analogy in mind: Kubernetes documentation recommends an odd number of etcd members, typically five in production, so that a majority survives the loss of a minority. Apply the same reasoning when you decide between three and five OpenBao pods, and avoid planned changes that take a majority offline at once.

Upgrade one pod at a time and wait for each to rejoin and report healthy before moving to the next, so the cluster keeps a Raft majority throughout. Take a snapshot immediately before the upgrade and check the release notes for the target version, because some changes apply only to specific minor lines. Align the OpenBao upgrade with the Kubernetes version skew policy: kube-apiserver is upgraded one minor version at a time, before the kubelets, and kubelets may run up to three minor versions behind the API server. Schedule OpenBao rollouts after cluster upgrades settle, or before them, but not during them. Confirm the supported Kubernetes versions for your chosen chart and OpenBao release, and rehearse the full sequence in a non-production cluster first.

How DeployOpen delivers OpenBao on Kubernetes

DeployOpen plans, builds, documents and supports self-hosted OpenBao inside your own Kubernetes clusters and cloud accounts. For an HA Raft deployment, we start from your failure requirements, storage and unseal decisions, and then build the cluster so the team that runs it can verify and operate it.

How we scope

  • The written scope lists the clusters, namespaces, Helm chart version and OpenBao release line covered by the work.
  • We confirm pod count, node placement, storage class, and the unseal method before any values file is written.
  • Engagements are fixed-scope, with deliverables and timelines agreed in writing before work starts.

How we build

  • We write the server.ha.raft values, node IDs and retry join settings, then review them against your cluster topology.
  • We test auto-unseal by rescheduling pods and confirming each one rejoins the Raft cluster without manual steps.
  • We validate active and standby routing through the Kubernetes service and confirm that failover behaves as documented.

How we hand over

  • You receive the Helm values, runbooks for pod replacement, peer removal and snapshot restore, and the verification results.
  • We document which steps need an operator, such as recovery key handling, and which run automatically after rescheduling.
  • Your team completes a supervised failover drill so it knows the expected behavior before production traffic depends on it.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers, covering OpenBao and chart version changes.
  • Each OpenBao upgrade is planned against the release notes and tested on a non-production cluster first.
  • Backup and restore checks are repeated on a schedule you agree, so snapshot recovery stays verified over time.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.