docker pull cgr.dev/chainguard/keycloak-operator
Need access to a specific version? Contact us.
Get notified of upcoming product changes, critical vulnerability notifications and patches and more.
Sign inA Kubernetes Operator based on the Operator SDK for installing and managing Keycloak.
The image is available on cgr.dev
:
You can install the Operator on a vanilla Kubernetes cluster by using kubectl commands:
Install the CRDs by entering the following commands:
Next, install the Keycloak operator with Chainguard images using following steps:
curl -o keycloak-operator.yml https://raw.githubusercontent.com/keycloak/keycloak-k8s-resources/24.0.4/kubernetes/kubernetes.yml
sed -i '' 's|quay.io/keycloak/keycloak:.*|cgr.dev/chainguard/keycloak:latest|' keycloak-operator.yml
sed -i '' 's|quay.io/keycloak/keycloak-operator:.*|cgr.dev/chainguard/keycloak-operator:latest|' keycloak-operator.yml
kubectl apply -f keycloak-operator.yml
NOTE : The above sed commands were for MacOS (BSD based), for Linux GNU based, replace sed -i '' 's
with sed -i 's
Currently the Operator watches only the namespace where the Operator is installed.
Once the Keycloak Operator is installed and running in the cluster namespace, you can set up the other deployment prerequisites.
Database
Hostname
TLS Certificate and associated keys
For development purposes, you can use an ephemeral PostgreSQL pod installation. To provision it, follow the approach below:
Create YAML file example-postgres.yaml
:
Apply the changes:
For a production ready installation, you need a hostname that can be used to contact Keycloak. See Configuring the hostname for the available configurations.
For development purposes, this guide will use test.keycloak.org
.
See your Certification Authority to obtain the certificate and the key.
For development purposes, you can enter this command to obtain a self-signed certificate:
You should install it in the cluster namespace as a Secret by entering this command:
Consider storing the Database credentials in a separate Secret. Enter the following commands:
For a basic deployment, you can stick to the following approach:
Create YAML file example-kc.yaml
:
Apply the changes:
To check that the Keycloak instance has been provisioned in the cluster, check the status of the created CR by entering the following command:
When the deployment is ready, look for output similar to the following:
For further reference, please refer to official documentation of the project
Chainguard Images contain software packages that are direct or transitive dependencies. The following licenses were found in the "latest" version of this image:
MIT
Apache-2.0
BSD-3-Clause
FTL
GPL-2.0-only
GPL-2.0-or-later
LGPL-2.1-or-later
For a complete list of licenses, please refer to this Image's SBOM.
Software license agreementProducts
Chainguard Images© 2024 Chainguard, Inc.