Upgrade from v12 to v13

This guide describes the steps to perform an upgrade of the component from version v12 to v13.

It’s higly recommended to scale the Keycloak statefulset to 1 during the upgrade. The Infinispan cluster can’t handle the upgrade to v21.1.2 properly and fails with the error message ERROR [org.jgroups.protocols.TCP] failed handling incoming message: java.lang.IllegalArgumentException: invalid magic number 256; needs to be in range [0..100]. After the upgrade the Infinispan cluster works properly again.


  • The component requires Kubernetes v1.23 or newer.

  • Keycloak version is v21.1.2 by default.

Step-by-step guide

When upgrading the component, the following actions are required if the built-in database is used:

  1. Do a backup of the built-in database.

    kubectl -n "${namespace}" exec -ti keycloak-postgresql-0 -c postgresql -- sh -c 'PGDATABASE="$POSTGRES_DB" PGUSER="$POSTGRES_USER" PGPASSWORD="$POSTGRES_PASSWORD" pg_dump --clean' > keycloak-postgresql-$(date +%F-%H-%M-%S).sql
  2. Apply the parameter changes.

  3. Compile and push the cluster catalog.