Keycloak high availability
Validate a supported single-cluster Keycloak topology before promising site-level resilience.
Last updated
On this page (5)
Keycloak ยท High availability
Before you start
- Kubernetes with multiple availability zones and enough capacity after a zone loss.
- Supported HA database with the latency and replication characteristics in the reference architecture.
Procedure
- Distribute Keycloak replicas across zones in one Kubernetes cluster; use the documented shared database and cache topology.
- Route user traffic only to ready instances and verify placement and database connectivity from each zone.
- Exercise login and token refresh while withdrawing a staging replica; test database failover as a distinct scenario.
Verify the result
- Readiness removes the failed replica and synthetic login/refresh recovers within the stated objective.
- Record the impact on existing sessions and do not claim independent-cluster disaster recovery from this test.
