Skip to content

Postgres DC-DR: setup, provisioning, switchover/failover and scaling guide - #1078

Draft
souravbiswassanto wants to merge 4 commits into
masterfrom
postgres-dcdr-docs
Draft

souravbiswassanto wants to merge 4 commits into
masterfrom
postgres-dcdr-docs

Conversation

@souravbiswassanto

Copy link
Copy Markdown
Member

Reworks docs/guides/postgres/distributed/ from a single overview page into a step-by-step guide for the released Postgres DC-DR (KubeDB v2026.10.12, dr-controlplane v0.1.0). A user can build the stretched hub, join spokes, install everything, create a DC-DR Postgres, write data, and run switchover / failover / failback by following the pages in order.

Pages (each with its own yamls/):

  • concepts — topology, per-DC Raft + arbiter, primary-DC Lease and failover scope (FailoverGroup), split-brain protection (Raft Pre-Vote in pg-coordinator; etcd Pre-Vote + CheckQuorum), measured RPO/RTO, limitations
  • stretched-hub — three-site etcd (--pre-vote=true), HAProxy, encryption at rest, kubeadm hub, verification
  • spoke-clusters — k3s spokes, OCM join, KubeSlice controller/worker, slice and slice.local DNS, traffic test
  • install — KubeDB with DC-DR values, petset CRDs, dr-controlplane, optional KubeStash
  • provision — FailoverGroup, PlacementPolicy, Postgres; Ready/Steady/protected; insert/update/select across DCs
  • switchover-failover — planned switchover, abort, planned failover (Lease handoff), unplanned failover, isolated DC, data-loss budget, failback, standby-hold, break-glass, troubleshooting
  • scaling — per-DC horizontal scaling
  • teardown

Notes for review:

  • Provisioning, data, switchover and planned-failover outputs were captured live on the lab today; unplanned DC loss, isolated DC, switchover abort and scaling outputs come from release test records. Standby-hold and break-glass are written from code and were not re-run on this release.
  • pg-coordinator Raft runs with Pre-Vote only (CheckQuorum not enabled); the docs say so and attribute stale-primary protection to the primary-DC Lease and write fence. etcd 3.7 always enables CheckQuorum and defaults Pre-Vote on.
  • Not documented (unreleased or not yet tested for DC-DR on this release): kubectl dba dc-dr (CLI v0.68.0 reads the old scope field), ThreeDC mode, DC-DR day-2 ops other than horizontal scaling (kubedb/postgres#946–docs(mongodb): fix mongo->mongosh client and sts->petset found by executing the guides #954 are open), KubeStash backup of a DC-DR database.
  • The stretched-hub sequence is assembled from the lab runbook and has not been replayed end to end as written. The SliceConfig bandwidth cap (5120 kbps) is copied from the lab.

…ovision, switchover/failover, scaling and teardown pages

Signed-off-by: souravbiswassanto <saurov@appscode.com>
Signed-off-by: souravbiswassanto <saurov@appscode.com>
- Use placeholder IPs instead of lab addresses; use $SPOKE_1_IP for the k3s TLS SAN.
- Concepts: per-DC PlacementPolicy is named <policy>-<dc>; add the
  spec.monitor limitation for v2026.10.12.
- Provision: warn that databases without a FailoverGroup share the
  default primary-dc scope and move together.
- Teardown: exact cleanup of the orphaned group Lease and marker
  ConfigMaps (dr-controlplane v0.1.0 keeps renewing them); correct the
  deletionPolicy summary; add Before You Begin.
- Scaling: use pg-docs like the other pages and check the active DC first.
- Switchover/failover: add the break-glass apply/delete commands; reword
  test-run references as examples.
- Install: clarify the bundled PetSet CRDs and the cached provisioner image note.

Signed-off-by: souravbiswassanto <saurov@appscode.com>
…t a gap

Signed-off-by: souravbiswassanto <saurov@appscode.com>
@github-actions

Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit 2ac3463):

https://kubedb-v2-hugo--pr1078-postgres-dcdr-docs-iobcgrmr.web.app

(expires Sun, 29 Nov 2026 08:34:12 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 0f29ae8ae0bd54a99bf2b223b6833be47acd5943

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant