Este conteúdo não está disponível no idioma selecionado.

Chapter 1. Red Hat build of Keycloak Operator installation


How to install the Operator on OpenShift.

Use this procedure to install the Red Hat build of Keycloak Operator in an OpenShift cluster.

  1. Open the OpenShift Container Platform web console.
  2. In the left column, click Home, Operators, OperatorHub.
  3. Search for "Keycloak" on the search input box.
  4. Select the Operator from the list of results.
  5. Follow the instructions on the screen.

For general instructions on installing Operators by using either the CLI or web console, see Installing Operators in your namespace. In the default Catalog, the Operator is named rhbk-operator. Make sure to use the channel corresponding with your desired Red Hat build of Keycloak version.

1.1. Configuring Manual Approval for OLM Upgrades

Warning

Important: Automatic OLM Upgrades

By default, OLM automatically updates the Red Hat build of Keycloak Operator when a new version is released. This can cause several significant issues:

  • When using the default Red Hat build of Keycloak image, the Operator uses a matching image of the corresponding Red Hat build of Keycloak version, resulting in unintended Red Hat build of Keycloak upgrades when the Operator is upgraded
  • Even when using custom images, major Operator upgrades can introduce significant compatibility issues with your existing Keycloak CR configuration, potentially requiring manual intervention
  • New fields in Keycloak CR or behavioral changes could impact existing deployments
  • No option to downgrade to the previous Red Hat build of Keycloak version due to changes related to database migration

Recommendation:

We strongly recommend using manual approval mode for the Red Hat build of Keycloak Operator. This ensures you can:

  1. Review release notes and follow migration changes before approving upgrades
  2. Schedule maintenance windows for upgrades
  3. Test upgrades in a non-production environment first
  4. Back up the database to allow downgrading to the previous Red Hat build of Keycloak in case of issues

To prevent automatic upgrades by OLM, set the approval strategy to Manual when installing the Operator:

1.1.1. Using the OpenShift web console

When installing the Operator, select Manual approval in the update approval strategy section:

1.1.2. Using the CLI

For command-line installation, create a Subscription with installPlanApproval: Manual:

apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
  name: rhbk-operator
  namespace: <target-namespace>
spec:
  channel: <desired-channel>
  name: rhbk-operator
  source: redhat-operators
  sourceNamespace: openshift-marketplace
  installPlanApproval: Manual
Copy to Clipboard Toggle word wrap

After installation, any upgrade will require manual approval through the OLM interface or via the CLI.

1.2. Installing Multiple Operators

It is not fully supported for the operator to watch multiple or all namespaces. To watch multiple namespaces, you install multiple operators.

In this situation, consider the following:

  • All Operators share the Custom Resource Definitions (CRDs) as they are installed cluster wide.
  • CRD revisions from newer Operator versions will not introduce breaking changes except for the eventual removal of fields that have been deprecated for some time. Thus newer CRDs are generally backward compatible.
  • The last installed CRDs become the ones that are used. This rule also applies to OLM installations; the last installed Operator version also installs and overrides the CRDs if they already exist in the cluster.
  • Older CRDs may not be forward compatible with new fields used by newer operators. When using OLM it will check if your custom resources are compatible with the CRDs being installed, so the usage of new fields can prevent the simultaneous installation of older operator versions.
  • Fields introduced by newer CRDs are not supported by older Operators. Older Operators fail to handle CRs that use such new fields with a deserialization error for an unrecognized field.

Therefore, in a multiple Operator installation scenario, the recommended approach is to keep versions aligned as closely as possible to minimize the potential problems with different versions.

Voltar ao topo
Red Hat logoGithubredditYoutubeTwitter

Aprender

Experimente, compre e venda

Comunidades

Sobre a documentação da Red Hat

Ajudamos os usuários da Red Hat a inovar e atingir seus objetivos com nossos produtos e serviços com conteúdo em que podem confiar. Explore nossas atualizações recentes.

Tornando o open source mais inclusivo

A Red Hat está comprometida em substituir a linguagem problemática em nosso código, documentação e propriedades da web. Para mais detalhes veja o Blog da Red Hat.

Sobre a Red Hat

Fornecemos soluções robustas que facilitam o trabalho das empresas em plataformas e ambientes, desde o data center principal até a borda da rede.

Theme

© 2025 Red Hat