# Walking Through a Planned Failover: SQL Server Always On Availability Groups on Kubernetes

DevFeed: [Walking Through a Planned Failover: SQL Server Always On Availability Groups on Kubernetes](<https://devfeed.tech/articles/walking-through-a-planned-failover-sql-server-always-on-availability-groups-on-kubernetes-17553.md>)

Original publisher: [Read original article](<https://www.nocentino.com/posts/2026-04-19-planned-failover-walkthrough-sql-server-kubernetes-operator/>)

Author: Anthony Nocentino

Published: 2026-04-19T05:00:00Z

Content type: tutorial

Language: en

Sources: [Kubernetes on Anthony Nocentino's Blog](<https://devfeed.tech/sources/kubernetes-on-anthony-nocentino-s-blog.md>)

Topics: [sql-server](<https://devfeed.tech/topics/sql-server.md>), [Kubernetes](<https://devfeed.tech/topics/kubernetes.md>), [Availability](<https://devfeed.tech/topics/availability.md>)

Tags: [availability-groups](<https://devfeed.tech/tags/availability-groups.md>), [containers](<https://devfeed.tech/tags/containers.md>), [failover](<https://devfeed.tech/tags/failover.md>), [kubernetes](<https://devfeed.tech/tags/kubernetes.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [operator](<https://devfeed.tech/tags/operator.md>), [sql-server](<https://devfeed.tech/tags/sql-server.md>)

## AI overview

A walkthrough of planned failover rotation for a three-replica SQL Server Availability Group managed by sql-on-k8s-operator on Kubernetes. It examines SQL Server error logs, operator reconciliation behavior, and timing under both an idle database and a sustained TPC-C workload.

## Source excerpt

When building the sql-on-k8s-operator, I wanted to make sure it could handle both planned and unplanned failovers. The easy case is a planned failover, where you deliberately move the primary role to another replica. The harder case is an unplanned failover, where the primary pod just disappears. The operator needs to handle both. I recently ran a full planned failover rotation on a three-replica SQL Server Availability Group managed by sql-on-k8s-operator, and I want to show you exactly what happens inside SQL Server and the operator during each hop. If you've been following my Introducing the SQL Server on Kubernetes Operator post, this is the logical next step: what does the error log actually look like during a planned failover, what does the operator do in response, and how long does the whole thing take?