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

  1. Distribute Keycloak replicas across zones in one Kubernetes cluster; use the documented shared database and cache topology.
  2. Route user traffic only to ready instances and verify placement and database connectivity from each zone.
  3. 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.

Official documentation

Have Pilae operate Keycloak

We agree what to monitor, how to recover and who responds when something breaks. Bring your existing deployment or start with a new one.