Keycloak Operator Installation

How to install the Keycloak Operator on Kubernetes and OpenShift

Installing the Keycloak Operator

This guide describes how to install the Keycloak Operator in a Kubernetes or OpenShift cluster.

Installing by using the Operator Lifecycle Manager

The recommended way to install the Keycloak Operator in Kubernetes environments is to use the Operator Lifecycle Manager (OLM).

Prerequisites

  • Make sure OLM is installed in your environment. For details, see Installing OLM.

  • Be sure that you have cluster-admin permission or an equivalent level of permissions granted by an administrator.

Using the OpenShift web console

The following procedure describes how to install the Keycloak Operator. However, for general instructions on installing Operators using OLM, see Install your operator with OLM. In the default Catalog, the Keycloak Operator is named keycloak-operator. Make sure to use the fast channel to find the operator.

Perform this procedure on 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.

    Select the Keycloak Operator in the UI
  4. Select the Keycloak Operator from the list of results.

  5. Follow the instructions on the screen.

    Make sure you are installing from the fast channel:

    Configure Keycloak Operator

Installing by using kubectl without Operator Lifecycle Manager

You can install the Operator on a vanilla Kubernetes cluster by using kubectl commands:

  1. Install the CRDs by entering the following commands:

    kubectl apply -f https://raw.githubusercontent.com/keycloak/keycloak-k8s-resources/23.0.7/kubernetes/keycloaks.k8s.keycloak.org-v1.yml
    kubectl apply -f https://raw.githubusercontent.com/keycloak/keycloak-k8s-resources/23.0.7/kubernetes/keycloakrealmimports.k8s.keycloak.org-v1.yml
  2. Install the Keycloak Operator deployment by entering the following command:

    kubectl apply -f https://raw.githubusercontent.com/keycloak/keycloak-k8s-resources/23.0.7/kubernetes/kubernetes.yml

Currently the Operator watches only the namespace where the Operator is installed.

On this page