Keycloak Operator Installation
In this guide we will show how to install the Keycloak Operator in your Kubernetes or OpenShift cluster.
OLM Installation
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 Guidance on how to install OLM, follow this guide.
The Keycloak Operator OLM package can be installed from the OLM catalog. For general instructions on how to install operators using OLM, follow the instructions on the OLM page.
In the default Catalog, the Keycloak Operator is named keycloak-operator
. Make sure to use the candidate
channel to find the operator.
OpenShift UI
On OpenShift, use the built-in OLM UI to install the Keycloak Operator.
Navigate to Home
, Operators
, OperatorHub
using the menu on the left side of the OpenShift Console.
Search for "keycloak" on the search input box:
Select the Keycloak Operator from the list of results. After that, follow the instructions on the screen. Make sure you are installing from the candidate
channel:
Vanilla Kubernetes Installation
To install the operator on a vanilla Kubernetes cluster, you first need to install its CRDs by running the following commands:
kubectl apply -f https://raw.githubusercontent.com/keycloak/keycloak-k8s-resources/20.0.0/kubernetes/keycloaks.k8s.keycloak.org-v1.yml
kubectl apply -f https://raw.githubusercontent.com/keycloak/keycloak-k8s-resources/20.0.0/kubernetes/keycloakrealmimports.k8s.keycloak.org-v1.yml
After successful CRD installation, install the Keycloak Operator deployment by running the following command:
kubectl apply -f https://raw.githubusercontent.com/keycloak/keycloak-k8s-resources/20.0.0/kubernetes/kubernetes.yml
Currently the operator watches only the namespace where the operator is installed.