keycloakx

by codecentric

Helm chartv7.4.0App 26.8.1Verified publisher

Keycloak.X - Open Source Identity and Access Management for Modern Applications and Services

About this chart

Keycloak-X

Keycloak-X is an open source identity and access management for modern applications and services.

Note that this chart is the logical successor of the Wildfly based codecentric/keycloak chart.

TL;DR;

$ cat << EOF > values.yaml
command:
  - "/opt/keycloak/bin/kc.sh"
  - "start"
  - "--http-port=8080"
  - "--hostname-strict=false"
extraEnv: |
  - name: KEYCLOAK_ADMIN
    value: admin
  - name: KEYCLOAK_ADMIN_PASSWORD
    value: admin
  - name: JAVA_OPTS_APPEND
    value: >-
      -Djgroups.dns.query={{ include "keycloak.fullname" . }}-headless
EOF

$ helm install keycloak codecentric/keycloakx --values ./values.yaml

Note that the default configuration is not suitable for production since it uses a h2 file database by default. It is strongly recommended to use a dedicated database with Keycloak.

For more examples see the examples folder.

Introduction

This chart bootstraps a Keycloak StatefulSet on a Kubernetes cluster using the Helm package manager. It provisions a fully featured Keycloak installation. For more information on Keycloak and its capabilities, see its documentation.

Installing the Chart

To install the chart with the release name keycloakx:

$ helm install keycloak codecentric/keycloakx

or via GitHub Container Registry:

$ helm install keycloak oci://ghcr.io/codecentric/helm-charts/keycloakx --version <version>

Uninstalling the Chart

To uninstall the keycloakx deployment:

$ helm uninstall keycloakx

Configuration

The following table lists the configurable parameters of the Keycloak-X chart and their default values.

ParameterDescriptionDefault
fullnameOverrideOptionally override the fully qualified name""
nameOverrideOptionally override the name""
namespaceOverrideOptionally override the namespace for all resources. Useful for umbrella charts that deploy multiple aliased keycloak instances each into their own namespace.""
replicasThe number of replicas to create1
commonLabelsAdditional labels applied to every resource in this chart, and on the StatefulSet's pods{}
image.repositoryThe Keycloak image repositoryquay.io/keycloak/keycloak
image.tagOverrides the Keycloak image tag whose default is the chart version""
image.digestOverrides the Keycloak image tag with a digest""
image.pullPolicyThe Keycloak image pull policyIfNotPresent
imagePullSecretsImage pull secrets for the Pod[]
hostAliasesMapping between IPs and hostnames that will be injected as entries in the Pod's hosts files[]
enableServiceLinksIndicates whether information about services should be injected into Pod's environment variables, matching the syntax of Docker linkstrue
updateStrategyStatefulSet update strategy. One of RollingUpdate or OnDeleteRollingUpdate
podManagementPolicyPod management policy. One of Parallel or OrderedReadyOrderedReady
revisionHistoryLimitNumber of old ReplicaSets to retain for rollback. Defaults to Kubernetes default (10) if not set""
restartPolicyPod restart policy. One of Always, OnFailure, or NeverAlways
serviceAccount.createSpecifies whether a ServiceAccount should be createdtrue
serviceAccount.allowReadPodsSpecifies whether the ServiceAccount can get or list podsfalse
serviceAccount.nameThe name of the service account to use. If not set and create is true, a name is generated using the fullname template""
serviceAccount.annotationsAdditional annotations for the ServiceAccount{}
serviceAccount.labelsAdditional labels for the ServiceAccount{}
serviceAccount.imagePullSecretsImage pull secrets that are attached to the ServiceAccount[]

Deploy keycloakx with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has keycloakx on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartkeycloakx is pinned at v7.4.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply