This guide describes how to install the Keycloak Operator in a Kubernetes or OpenShift cluster.
The recommended way to install the Keycloak Operator in Kubernetes environments is to use the Operator Lifecycle Manager (OLM).
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.
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.
Open the OpenShift Container Platform web console.
In the left column, click Home, Operators, OperatorHub.
Search for "keycloak" on the search input box.
Select the Keycloak Operator from the list of results.
Follow the instructions on the screen.
Make sure you are installing from the fast channel:
You can install the Operator on a vanilla Kubernetes cluster by using
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
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.