1
<#import "/templates/guide.adoc" as tmpl>
2
<#import "/templates/kc.adoc" as kc>
3
<#import "/templates/options.adoc" as opts>
4
<#import "/templates/links.adoc" as links>
5
<#import "/templates/profile.adoc" as profile>
8
title="{project_name} Operator Installation"
10
summary="How to install the {project_name} Operator on Kubernetes and OpenShift">
12
== Installing the {project_name} Operator
13
This {section} describes how to install the {project_name} Operator in a Kubernetes or OpenShift cluster.
15
=== Installing by using the Operator Lifecycle Manager
17
The recommended way to install the {project_name} Operator in Kubernetes environments is to use the Operator Lifecycle Manager (OLM).
20
* Make sure OLM is installed in your environment. For details, see https://github.com/operator-framework/operator-lifecycle-manager/blob/master/doc/install/install.md#install-a-release[Installing OLM].
22
* Be sure that you have cluster-admin permission or an equivalent level of permissions granted by an administrator.
24
==== Using the OpenShift web console
26
The following procedure describes how to install the {project_name} Operator. However, for general instructions on installing Operators using OLM, see https://olm.operatorframework.io/docs/tasks/install-operator-with-olm/[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.
28
Perform this procedure on an OpenShift cluster.
30
. Open the OpenShift Container Platform web console.
32
. In the left column, click *Home*, *Operators*, *OperatorHub*.
34
. Search for "keycloak" on the search input box.
36
image::select-operator.jpeg["Select the {project_name} Operator in the UI"]
38
. Select the {project_name} Operator from the list of results.
39
. Follow the instructions on the screen.
41
Make sure you are installing from the *fast* channel:
43
image::configure-operator.png["Configure {project_name} Operator"]
46
=== Installing by using kubectl without Operator Lifecycle Manager
48
You can install the Operator on a vanilla Kubernetes cluster by using `kubectl` commands:
50
. Install the CRDs by entering the following commands:
52
[source,bash,subs="attributes+"]
54
kubectl apply -f https://raw.githubusercontent.com/keycloak/keycloak-k8s-resources/{version}/kubernetes/keycloaks.k8s.keycloak.org-v1.yml
55
kubectl apply -f https://raw.githubusercontent.com/keycloak/keycloak-k8s-resources/{version}/kubernetes/keycloakrealmimports.k8s.keycloak.org-v1.yml
58
. Install the {project_name} Operator deployment by entering the following command:
60
[source,bash,subs="attributes+"]
62
kubectl apply -f https://raw.githubusercontent.com/keycloak/keycloak-k8s-resources/{version}/kubernetes/kubernetes.yml
65
Currently the Operator watches only the namespace where the Operator is installed.
66
</@profile.ifCommunity>