Run Microsoft SQL Server 2022 with Always On Availability Groups on Kubernetes. Automated failover via Syncer, full Day-2 operations, and PITR backup — managed by a single enterprise operator.
Enterprise Edition Only — The SQL Server addon is not available in the open-source KubeBlocks distribution. A KubeBlocks Enterprise license is required to deploy and manage SQL Server clusters.
HA Technology
Backup Recovery
Deploy SQL Server in 2 steps
Install KubeBlocks Enterprise operator
Contact us to get access → kubeblocks.com/contact
Create a SQL Server Cluster
# Requires KubeBlocks Enterprise
apiVersion: apps.kubeblocks.io/v1
kind: Cluster
metadata:
name: mssql-cluster
namespace: demo
spec:
clusterDef: mssql
topology: cluster
terminationPolicy: Delete
componentSpecs:
- name: mssql
replicas: 3
serviceVersion: "2022.19.0"
volumeClaimTemplates:
- name: data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 20GiTrusted by Engineering Teams at Scale
KubeBlocks deploys SQL Server 2022 with a 3-replica Always On Availability Group. In the default topology, synchronous commit ensures zero data loss on failover. When the primary fails, Syncer promotes a secondary and updates the read-write Service endpoint automatically.
KubeBlocks replaces the traditional Pacemaker/Corosync stack with its own lightweight Syncer component. Syncer continuously monitors replica health and orchestrates failover, making Always On AG fully operational in ephemeral container environments without OS-level cluster dependencies.
AlwaysOn AG with 1 Primary and 2 Secondaries — synchronous replication across all replicas before acknowledging writes (default 3-replica topology)
Automatic failover via KubeBlocks Syncer — detects primary failure and promotes a secondary within seconds, no Pacemaker required
Two dedicated Kubernetes Services: read-write (Primary) on :1433 and read-only (Secondaries) on :1433 for traffic separation
Stable FQDNs via headless Services — AG endpoints use pod DNS names for consistent network identity across pod restarts
Role probing via roleProbe lifecycle action — KubeBlocks always knows which pod is Primary and routes traffic accordingly
Built-in Prometheus metrics exporter sidecar per replica for observability integration
Declare an OpsRequest or Cluster resource and KubeBlocks handles the rest.
High Availability
AlwaysOn AG
Deploy 3-replica AG with synchronous replication; Syncer handles automatic failover
Auto Failover
Primary failure detected by Syncer; secondary promoted and Service endpoint updated within seconds
Read/Write Split
mssql-rw Service routes to Primary; mssql-ro Service load-balances across Secondaries
Rolling Restart
Restart all replicas one at a time without AG disruption
Stop / Start
Suspend the cluster to save resources; resume without data loss
Day-2 Operations
Vertical Scaling
Resize CPU and memory for all replicas via OpsRequest; rolling apply keeps AG online
Volume Expansion
Expand SQL Server data volume via OpsRequest — online expansion requires a StorageClass that supports it
Dynamic Config
Reconfigure mssql.conf parameters via Reconfiguring OpsRequest — some take effect online; others apply via a controlled rolling restart
Full Backup
On-demand or scheduled full database backup to S3-compatible storage
Incremental Backup
Backs up changes since the last full backup — faster and smaller than a full backup
PITR
Transaction-log backup (when enabled, default cron: every minute) enables point-in-time recovery to any second within the retention window
KubeBlocks automates the hardest parts of running SQL Server on Kubernetes — so your team doesn't have to.
KubeBlocks SQL Server is available as part of KubeBlocks Enterprise. Contact us to get started with Always On AG, PITR backup, and full Day-2 operations on your Kubernetes clusters.
Requires KubeBlocks Enterprise License