Operator installation guide
This commit is contained in:
parent
046935b9e1
commit
73f8909bd8
6 changed files with 50 additions and 11 deletions
BIN
docs/guides/src/main/images/configure-operator.jpeg
Normal file
BIN
docs/guides/src/main/images/configure-operator.jpeg
Normal file
Binary file not shown.
After Width: | Height: | Size: 83 KiB |
BIN
docs/guides/src/main/images/select-operator.jpeg
Normal file
BIN
docs/guides/src/main/images/select-operator.jpeg
Normal file
Binary file not shown.
After Width: | Height: | Size: 141 KiB |
|
@ -68,7 +68,7 @@ spec:
|
|||
- port: 5432
|
||||
targetPort: 5432
|
||||
EOF
|
||||
kubectl|oc apply -f example-postgres.yaml
|
||||
kubectl apply -f example-postgres.yaml
|
||||
----
|
||||
|
||||
==== Hostname
|
||||
|
@ -135,7 +135,7 @@ spec:
|
|||
hostname: test.keycloak.org
|
||||
tlsSecret: example-tls-secret
|
||||
EOF
|
||||
kubectl|oc apply -f example-kc.yaml
|
||||
kubectl apply -f example-kc.yaml
|
||||
----
|
||||
|
||||
And you can check that the Keycloak instance has been provisioned in the cluster by looking at the status of the created CR:
|
||||
|
|
|
@ -5,14 +5,48 @@
|
|||
|
||||
<@tmpl.guide
|
||||
title="Keycloak Operator Installation"
|
||||
summary="How to install the Keycloak Operator on Kubernetes">
|
||||
|
||||
TODO: https://github.com/keycloak/keycloak/issues/10786
|
||||
summary="How to install the Keycloak Operator on Kubernetes and OpenShift">
|
||||
|
||||
== Keycloak Operator Installation
|
||||
In this guide we will show how to install the Keycloak Operator in your Kubernetes or OpenShift cluster.
|
||||
|
||||
=== OpenShift Installation
|
||||
=== OLM Installation
|
||||
|
||||
You can install the Keycloak Operator in Kubernetes environment is to use Operator Lifecycle Manager (OLM).
|
||||
Before moving on, make sure you have OLM installed, if not follow this https://github.com/operator-framework/operator-lifecycle-manager/blob/master/doc/install/install.md#install-a-release[guide].
|
||||
|
||||
To install the Keycloak Operator follow the https://olm.operatorframework.io/docs/tasks/install-operator-with-olm/[instructions].
|
||||
In the default Catalogs the Keycloak Operator is named `keycloak-operator` and make sure to use the `candidate` channel.
|
||||
|
||||
==== OpenShift UI
|
||||
|
||||
On OpenShift you can use a conveninet UI on top of OLM.
|
||||
Navigate `Home` → `Operators` → `OperatorHub` in the menu on the left side of the OpenShift Console.
|
||||
Then, focus on the search input box and type "keycloak":
|
||||
|
||||
image::{generatedGuideImages}/select-operator.jpeg["Select the Keycloak Operator in the UI"]
|
||||
|
||||
Next, navigate to Keycloak Operator and click on it. Next, follow the instructions on the screen, make sure you are installing from the `candidate` channel:
|
||||
|
||||
image::{generatedGuideImages}/configure-operator.jpeg["Configure Keycloak Operator"]
|
||||
|
||||
=== Vanilla Kubernetes Installation
|
||||
|
||||
To install the operator on a vanilla Kubernetes cluster, you need first to install the CRDs:
|
||||
|
||||
[source,bash,subs="attributes+"]
|
||||
----
|
||||
kubectl apply -f https://raw.githubusercontent.com/keycloak/keycloak-k8s-resources/{version}/kubernetes/keycloaks.k8s.keycloak.org-v1.yml
|
||||
kubectl apply -f https://raw.githubusercontent.com/keycloak/keycloak-k8s-resources/{version}/kubernetes/keycloakrealmimports.k8s.keycloak.org-v1.yml
|
||||
----
|
||||
|
||||
And then install the Keycloak Operator deployment:
|
||||
|
||||
[source,bash,subs="attributes+"]
|
||||
----
|
||||
kubectl apply -f https://raw.githubusercontent.com/keycloak/keycloak-k8s-resources/{version}/kubernetes/kubernetes.yml
|
||||
----
|
||||
|
||||
Currently the operator watches only the same namespace as it's installed.
|
||||
|
||||
</@tmpl.guide>
|
||||
|
|
|
@ -64,7 +64,7 @@ spec:
|
|||
displayName: ExampleRealm
|
||||
enabled: true
|
||||
EOF
|
||||
kubectl|oc apply -f example-realm-import.yaml
|
||||
kubectl apply -f example-realm-import.yaml
|
||||
----
|
||||
|
||||
And you can check the progress of the Import by running:
|
||||
|
|
|
@ -6,6 +6,7 @@ import org.apache.maven.plugin.logging.Log;
|
|||
import org.apache.maven.plugins.annotations.LifecyclePhase;
|
||||
import org.apache.maven.plugins.annotations.Mojo;
|
||||
import org.apache.maven.plugins.annotations.Parameter;
|
||||
import org.codehaus.plexus.util.FileUtils;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
|
@ -30,11 +31,15 @@ public class GuideMojo extends AbstractMojo {
|
|||
targetDir.mkdirs();
|
||||
}
|
||||
|
||||
log.info("Guide dir: " + srcDir.getAbsolutePath());
|
||||
log.info("Target dir: " + targetDir.getAbsolutePath());
|
||||
if (srcDir.getName().equals("images")) {
|
||||
FileUtils.copyDirectory(srcDir, targetDir);
|
||||
} else {
|
||||
log.info("Guide dir: " + srcDir.getAbsolutePath());
|
||||
log.info("Target dir: " + targetDir.getAbsolutePath());
|
||||
|
||||
GuideBuilder g = new GuideBuilder(srcDir, targetDir, log);
|
||||
g.build();
|
||||
GuideBuilder g = new GuideBuilder(srcDir, targetDir, log);
|
||||
g.build();
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
|
Loading…
Reference in a new issue