Why Keycloak Operator upgrades need their own plan
If you run Keycloak through the Keycloak Operator, upgrade the Operator and the Keycloak custom resource in a controlled, tested order, with manual approval set for Operator updates. The Operator is the piece that changes the running workload, so an update it applies automatically can roll a new Keycloak version into production before anyone has checked your realms, clients and custom providers against it. The Operator documentation strongly recommends manual approval mode for this reason, and it is the first setting to confirm in your cluster.
The Operator is installed through Operator Lifecycle Manager, which is the recommended method, and OLM tracks it through install channels and an install plan. Those two version streams are separate. The Operator release controls how the controller behaves and which custom resource definitions it manages, while the Keycloak custom resource carries the Keycloak server version the Operator deploys. Changing the Operator does not by itself guarantee the Keycloak version you intend, so confirm both values in the cluster after each step. Confirm the supported Operator and Keycloak pairings for your target release in the Operator documentation before you approve anything.
Plan the sequence before the change window. Approve the Operator update in a non-production cluster, check that the Keycloak custom resource reconciles, then apply the matching Keycloak version there and test realm imports, login flows, client tokens and logout. Run the update-compatibility check before any rolling update in production, because it reports whether the change can be applied without downtime. Ask your Operator and platform team to confirm who approves each install plan and who can edit the Keycloak custom resource, since both actions move the running version.
What changes in an Operator-managed upgrade
This table compares the parts of a Keycloak Operator upgrade that change: the Operator itself, the Keycloak custom resource, the Keycloak 26.8 release notes and the minor-release policy. Read each row as a question to answer before approving an update, since the Operator and the Keycloak server version can move at different points.
| Change | Impact on your cluster | Action needed |
|---|---|---|
| Operator release channel | Operator updates arrive through the OLM subscription channel and can install a new Operator version without a change to your Keycloak server version. | Confirm which channel your subscription follows and set the approval mode to manual so each Operator update is reviewed first. |
| Keycloak custom resource version | The Keycloak custom resource version follows the Operator, so a newer Operator may expect a newer resource schema. | Check the Operator release notes for the resource version it uses and update manifests in version control before applying them. |
| Keycloak 26.8 SMTP StartTLS | SMTP connections must use StartTLS and plaintext fallback is no longer allowed, which can break existing mail relays. | Test password reset and notification email in a staging realm and confirm your relay supports StartTLS. |
| Keycloak 26.8 backchannel logout tokens | Signature validation of backchannel logout tokens from external providers is mandatory. | Confirm each external identity provider signs its logout tokens and that the keys Keycloak holds for them are current. |
| Keycloak 26.8 login failure storage | Login failures are persisted to the database by default, adding write load and growing tables over time. | Size the database for the extra writes and review the retention and cleanup plan for these records. |
| Keycloak 26.8 multi-site feature | The deprecated multi-site feature is replaced by the stateless feature, and the 26.8 notes recommend moving to it. | If you run multi-site, plan the architecture change separately and do not treat the Operator update as the place to make it. |
| Minor release breaking changes | Breaking changes in a minor release are opt-in, so applying a new minor version does not by itself change behavior that you have not enabled. | Read the per-release migration notes and list each opt-in feature you intend to enable, with a test for each. |
What to prepare before approving an Operator update
An Operator update changes the controller that manages your Keycloak custom resources and, in turn, how Keycloak is deployed. Before you approve it, the four preparation items below give you a way back, a complete picture of what could break, a place to prove the change, and a clear reading of what the target release changes.
Restorable database backup
Keycloak migrates its database schema automatically at startup by default, so a failed or partial migration can leave the database in a state the previous Keycloak version cannot read. Take a backup of the database that you have actually restored once, and confirm that the restore completes and the realms load. Ask your database team who owns the restore, where the backup is stored, and how long a restore takes in your environment.
Upgrading guideInventory of realms and clients
List every realm, client, identity provider, user federation link, and custom provider in the running deployment, including the Keycloak custom resources managed by the Operator. Operator-managed resources are reconciled from their manifests, so changes made only in the admin console may be overwritten or may not match what the new controller expects. Compare this inventory with what your Git repository declares to find drift before the upgrade starts.
Custom themes and providers
Custom login themes, SPI providers and extensions are the most common reason a Keycloak upgrade fails after the server starts. List each theme and provider, the Keycloak version it was built against, and the build step that produces it. Confirm which of them your team can rebuild and retest against the target release, and assign an owner for each one.
Production-like test cluster
Test realm changes on a cluster that mirrors production in Keycloak version, Operator version, database engine, and proxy and hostname configuration. A test cluster with a different database or a simpler ingress can pass checks that production would fail. Load a copy of production realm data or a representative subset, then log in through each client type and test token refresh and logout before you approve the update for production.
Target release notes review
Read the upgrade notes for every Keycloak release between your current version and the target, not only the latest one. Note any behavior that changes by default, any option that becomes mandatory, and any feature the release deprecates. Record each item as a pass or fail check in the test plan, and name the person who signs off on each one before approval.
Release updates policyHow to upgrade Keycloak through the Operator step by step
This sequence moves a Keycloak Operator installation to a newer version with a tested rollback point, so each approval is backed by evidence from a test namespace rather than a hopeful restart in production.
Confirm the install channel and approval mode
Your platform team checks which Operator Lifecycle Manager subscription channel the Keycloak Operator follows and whether its install plan approval is set to manual. The Keycloak Operator documentation strongly recommends manual approval for operator updates, because automatic approval can upgrade the Operator without a review step. Record the current Operator version, the target version and the Keycloak image version the Operator will deploy. The step is done when the subscription, approval mode and both versions are written in the change record. Confirm the exact channel names with the installation guide for your cluster, since they depend on how the Operator was installed.
Mirror production into a test namespace
Create a test namespace that matches production as closely as you can manage: the same Keycloak custom resource settings, the same database engine and version, the same TLS certificates pattern, the same reverse proxy and hostname configuration, and a restored copy of the production database. Use a backup taken for this purpose, not the live database. Keep the test environment isolated from production identity providers and outbound email so test traffic cannot affect real users. The step is done when the test Keycloak starts on the current version and a sign-in works end to end.
Import and test realms and clients on the new Operator version
Install the target Operator version in the test namespace and let it reconcile the mirrored Keycloak custom resource. Import representative realms with KeycloakRealmImport resources where your configuration is managed that way, and confirm that KeycloakOIDCClient and KeycloakSAMLClient resources reconcile without drift. Test sign-in, token issuance, logout, brokered identity providers, user federation and admin console access for each realm. Watch the Operator and Keycloak logs for schema migration messages. The step is done when every test in your written checklist passes and the test results are attached to the change record.
Check rolling update compatibility
Run the update-compatibility command against the current and target Keycloak versions to see whether a zero-downtime rolling update is possible. The command exits 0 when a rolling update is possible and exits 3 when it is not. An exit code of 0 means the Operator can roll pods with the current deployment, while exit code 3 means a planned maintenance window with full downtime is needed, or that you must plan the path differently. Keep the output in the change record, and confirm with your platform team which exit code they will treat as a go decision. The step is done when the exit code and the planned rollout method are recorded.
Approve the install plan
Once the test namespace passes and the compatibility check has the result you planned for, an authorized operator approves the pending install plan in the production namespace. Approval is a deliberate action in Operator Lifecycle Manager, and it should be done in a watched window with the rollback procedure open. Confirm that the Operator pod restarts on the new version and that it begins reconciling the Keycloak custom resource. The step is done when the install plan shows as complete and the Operator reports the expected version.
Verify health and metrics after the rollout
Check that every Keycloak pod reports ready, that the health endpoints on the management interface respond, and that Prometheus-format metrics are available at the metrics path if metrics are enabled. Compare error rates, login latency, token request volume and database connection use with the pre-upgrade baseline. Sign in to a test account in each critical realm and confirm logout and token refresh behave as expected. Review the Keycloak logs for schema migration status and warnings. The step is done when the baseline comparison shows no regressions, and the results are recorded against the change.
Define the rollback point before each change
Before the install plan is approved, record what you would restore and how: the database backup taken for this change, the previous Operator version and its install plan, and the Keycloak custom resource manifest as it stood before the upgrade. Ask your database team to confirm that the backup is restorable, because a schema migration that has already run may not reverse cleanly. Agree on the decision point at which you would stop and roll back. The step is done when the rollback steps are written, reviewed by the on-call owner and linked from the change record before approval.
How the Keycloak custom resource follows the Operator version
The Keycloak Operator manages four custom resource types on your cluster: Keycloak, KeycloakRealmImport, KeycloakOIDCClient and KeycloakSAMLClient. The schema of these resources is defined by the Operator release you install, so the apiVersion and field set you write are tied to the Operator version, not to the Keycloak server image on its own. When you bump the Operator, the custom resources you alreadyApplied may need new fields, renamed settings or changed defaults. Read the Operator documentation for each bump before you approve it, and confirm in the release notes for your target version which custom resource versions it serves and whether any existing manifests need editing.
The Operator also decides which Keycloak server version it deploys by default, so an Operator upgrade can change the server image as well as the resource schema. For that reason, manual approval is the setting to use. The Operator documentation strongly recommends manual approval mode for operator updates to avoid unintended automatic upgrades. With automatic approval, OLM can install a new Operator version as soon as it appears in your channel, and a sign-in outage or a schema mismatch can reach production before anyone has read the change. Manual approval holds the new version as a pending install plan until a named person approves it, which gives you a window to compare your manifests with the new schema and to run the update in a non-production namespace first.
Before approving, confirm three things with the vendor documentation for your exact versions: the Operator release notes for the custom resource changes, the Keycloak server version the Operator will deploy, and the upgrade path between those versions. Check whether the Keycloak server upgrade needs the update-compatibility check described elsewhere on this page. Keep your Keycloak, realm import and client manifests in version control so you can diff them against the new schema and roll back the manifests as well as the Operator subscription. Ask your implementation partner or platform team to record who approves each install plan and what evidence they reviewed, because that record is what your change management and audit reviewers will ask for.
Which upgrade path fits your current version
A patch release stays within the same major and minor stream, for example moving between two releases in the same 26.x line. This is the lowest-risk path because Keycloak supports zero-downtime rolling updates between patch releases of the same stream, provided the update-compatibility check allows it. Run the check against your current and target versions before approving the Operator update.
- Run the compatibility check first: The update-compatibility command exits 0 when a rolling update is possible and 3 when it is not. Treat exit code 3 as a signal to plan a full restart window.
- Confirm the Operator channel: Patch updates arrive through the Operator subscription, so confirm which channel and target version your approval will install.
- Test the realm on a staging cluster: Import a copy of your production realms and run a login, token refresh and logout flow for each client.
- Watch sessions during rollout: Confirm that pods restart one at a time and that sticky sessions or a shared cache keep active users signed in.
- Keep a rollback path: Record the current Operator version and the Keycloak custom resource before you approve the change.
Before approving, check the compatibility result and the Keycloak release notes for the target patch release.
A minor release inside the 26 line moves you to a later quarterly release, such as a jump across several 26.x minors. Since Keycloak 26.0 the project says breaking changes in a minor release are opt-in, but each minor still carries its own migration notes that may change defaults or require configuration before the new version starts. Rolling updates are not guaranteed across minor boundaries, so the compatibility check decides whether you can avoid downtime.
- Read each intervening release's notes: If you skip several minors, read every set of migration notes between your version and the target, not only the last one.
- Review opt-in changes: Note any breaking change that Keycloak gates behind a setting and decide whether to enable it now or later.
- Check the update-compatibility result: An exit code of 3 means you should plan a maintenance window instead of a rolling restart.
- Validate database migration: Schema changes run at startup by default, so confirm a restorable backup exists and that the migration duration fits your window.
- Retest integrations: Confirm that your identity providers, client redirects and any custom providers still work on the new minor.
Before approving, confirm the compatibility result for this exact minor transition and that your test realms pass the full login and logout matrix.
A jump from an older major version, such as a move from a Keycloak release before 26, crosses changes that the normal minor-release notes do not cover. These upgrades can change the Quarkus runtime, the database schema, hostname handling, persistent sessions and the adapters or themes you depend on. Do not use the Operator update alone to make this move. Work through the separate migration guide for each major boundary and plan it as a project with its own test cycle.
- Identify the starting major and minor: Confirm your running version exactly, because the migration guide depends on the boundary you cross.
- Follow the migration guide for each boundary: Use the guide that matches your starting version, and apply the steps in order when you cross several majors.
- Inventory custom code: List custom themes, SPI providers, deprecated adapters and client libraries, since these often break at a major boundary.
- Expect a full restart: Do not assume a rolling update is possible across a major boundary, and run the compatibility check to confirm.
- Plan a staged test environment: Build a Kubernetes namespace that mirrors production, migrate test realms there first, and record the time each step takes.
Before approving, confirm that the migration guide for your starting major has been applied to a staging copy and that custom code has passed on the target version.
What makes an Operator upgrade take longer
This table lists the factors that lengthen a Keycloak Operator upgrade and the direction each one pushes the effort. Read each row as a question to answer about your own environment before you estimate the test window. The main takeaway is that realm count, custom code and database schema handling usually matter more than the Operator upgrade itself.
| Driver | Why it changes effort | Direction of impact |
|---|---|---|
| Number of realms and clients | Each realm carries its own clients, role mappings and login flows that must be exercised after the Operator changes the Keycloak custom resource. | More realms and clients mean more test cases and a longer sign-in check. |
| Custom SPI providers and themes | Providers and login or account themes compiled against one Keycloak release may need rebuilding and retesting before the new image is approved. | Custom code raises effort sharply, since each provider adds a rebuild and a test pass. |
| External identity providers and federation | LDAP, Active Directory and brokered identity providers must be checked for sign-in, attribute mapping and sync behavior after the upgrade. | More federated sources increase the number of integration paths to verify. |
| Database size and schema migration mode | Automatic migration runs at startup, while manual migration means a DBA applies the SQL first, which adds coordination and a backup step. | Large databases lengthen migration time, and manual migration adds staffing and scheduling work. |
| High availability architecture | Multi-pod or multi-site setups need the rolling update path checked, and sessions and caches must survive pod replacement. | A more distributed design adds steps and verification points, especially where multiple sites are involved. |
| Number of environments to test | Each environment, such as development, test, staging and production, is upgraded and checked in order, often with its own realms and data. | Every added environment adds a full upgrade and verification cycle. |
What Keycloak Operator upgrades cost and what they need from your team
What drives the cost of a Keycloak Operator upgrade?
The cost follows the amount of change between your current and target setup, not the version number alone. The main drivers are how many Keycloak instances and realms you run, how much custom code, themes or SPI providers must be retested, how many client applications depend on the identity provider, and whether your cluster platform (Kubernetes or OpenShift) also needs upgrading at the same time. Each of these adds test and approval work. Ask the quote to separate the one-time work (planning, first-time Operator setup, realm test plan, cutover runbook) from any recurring work such as retainer-based patch and minor upgrades.
How long does a Keycloak Operator upgrade take?
Duration depends on scope and on how quickly approvers can sign off on test results, so there is no fixed figure that applies to every environment. The main timeline drivers are the number of non-production environments to step through, the size of the realm test matrix, the complexity of custom providers that need rebuilding, and your change-control calendar. Patch releases within the same minor stream are usually the shortest path because the rolling update check is available for them. Ask for a schedule with named gates: test realm sign-off, staging soak, production window and rollback point.
What does our team need to provide before an upgrade starts?
Most of the engagement depends on access and decisions from your side. Plan to provide:
- Cluster access with rights to install and manage the Operator, OperatorGroup and Subscription objects in the target namespaces
- A current database backup that you have tested for restore, plus the Keycloak database credentials needed for schema work
- Realm exports or a representative set of realms, clients and identity providers for the test matrix
- Named approvers from security, the identity owner and the application teams who will sign off on test results
- A maintenance window and a rollback decision owner
Confirm these with your own change-management process before scoping starts.
Can our in-house platform team run the Operator upgrade themselves?
Yes, if your team already operates Kubernetes or OpenShift, has database administration skills and can build a realm test plan. The Operator is installed through Operator Lifecycle Manager, which is the recommended method, so the install and subscription steps are familiar to most platform teams. The harder parts are usually the identity-specific checks: confirming client redirect URIs, token claims and logout behavior after the upgrade, and testing custom providers. A partner is most useful where those skills are missing or where the upgrade must be completed inside a fixed window.
How does manual approval change the upgrade workflow and its effort?
The Keycloak Operator documentation strongly recommends manual approval mode for operator updates to avoid unintended automatic upgrades. In practice, this means each new Operator version creates an install plan that waits for a named person to approve it. The effort shifts from reacting to surprise changes to a repeatable review cycle: read the release notes, deploy to a test environment, run the realm test matrix, then approve for production. This adds some ongoing work for your team, which is the trade-off for controlled change. Plan for that review cycle in your operating model rather than treating it as an exception.
What should we ask for in a written quote for this work?
Ask for a quote built from a written scope, because most engagements are fixed-scope with scope, deliverables and timelines agreed in writing before work starts. The quote should list: the Keycloak and Operator versions in and out of scope, the number of environments and realms covered, the test matrix and who signs off each result, database backup and migration responsibilities, the rollback plan, what is one-time and what recurs, and what happens if the scope changes during testing. DeployOpen does not publish a price list, so the quote is the place to confirm cost. Also ask who will be on the work and how post-upgrade support is handled.
Does the Operator upgrade cover licensing or vendor support costs?
The upstream Keycloak project is licensed under Apache 2.0, so the open source software itself carries no license fee. Costs arise from infrastructure, your team's time, and any engagement with a partner. If you use the Red Hat build of Keycloak on OpenShift, the subscription terms are set by Red Hat and are separate from this work, so confirm them with Red Hat and your procurement team before you scope. Ask your partner to state clearly which distribution and version the quote covers.
How the Operator, OLM and realm tests fit together
The flow starts at an OLM catalog source, where a channel publishes new Keycloak Operator versions. OLM creates an install plan that waits for manual approval instead of applying the update on its own. Once approved, the Operator reconciles the Keycloak custom resource in the production namespace. Before that approval, the team imports copies of its realms into a separate test namespace and checks logins, clients and federation there, so the approval decision rests on evidence from that test run.
Operator update flow with manual approval and a separate realm test namespace.
How DeployOpen scopes and delivers Keycloak Operator upgrades
DeployOpen plans and carries out Keycloak Operator upgrades inside your own clusters, starting from a written scope that names the Operator channel, the Keycloak custom resource and the realms to test. Each engagement ends with a tested upgrade path, documentation and a handover your platform team can run without us.
How we scope
- We inventory the installed Operator version, install channel, Keycloak custom resource version and database engine before any change is planned.
- The written scope lists which realms, clients and identity providers the upgrade test must cover, with agreed acceptance criteria.
- Engagements are fixed-scope, with deliverables and timelines agreed in writing before work starts; ongoing support is available as a retainer.
How we build
- We set the Operator subscription to manual approval and document who approves each update and on what evidence.
- We run the upgrade first in a non-production cluster, applying the Keycloak custom resource change the Operator version requires.
- We import copies of your test realms and exercise sign-in, token issuance, logout and admin actions before any production approval.
How we hand over
- You receive the runbook for approving Operator updates, including the install channel, approval steps and rollback notes.
- You receive a realm test checklist you can rerun before each future approval, along with the results from our test cycle.
- Documentation covers how the Keycloak custom resource version follows the Operator, so your team can plan each step with its release notes.
How we support
- Support covers each new Operator release you choose to evaluate, with the same staged test and approval steps.
- Retainers can include recurring retesting of realms and clients, and review of Keycloak release notes against your configuration.
- Confirm with DeployOpen during scoping which Operator versions, clusters and realms a retainer covers before signing.

