keycloak

by Camunda

Helm chartv7.1.6App 16.1.1Verified publisher

Keycloak is a high performance Java-based identity and access management solution. It lets developers add an authentication layer to their applications with minimum effort.

About this chart

Keycloak packaged by Bitnami

Keycloak is a high performance Java-based identity and access management solution. It lets developers add an authentication layer to their applications with minimum effort.

Overview of Keycloak

Trademarks: This software listing is packaged by Bitnami. The respective trademarks mentioned in the offering are owned by the respective companies, and use of them does not imply any affiliation or endorsement.

TL;DR

  helm repo add bitnami https://charts.bitnami.com/bitnami
  helm install my-release bitnami/keycloak

Introduction

Bitnami charts for Helm are carefully engineered, actively maintained and are the quickest and easiest way to deploy containers on a Kubernetes cluster that are ready to handle production workloads.

This chart bootstraps a Keycloak deployment on a Kubernetes cluster using the Helm package manager.

Bitnami charts can be used with Kubeapps for deployment and management of Helm Charts in clusters. This Helm chart has been tested on top of Bitnami Kubernetes Production Runtime (BKPR). Deploy BKPR to get automated TLS certificates, logging and monitoring for your applications.

Prerequisites

  • Kubernetes 1.19+
  • Helm 3.2.0+

Installing the Chart

To install the chart with the release name my-release:

$ helm repo add bitnami https://charts.bitnami.com/bitnami
$ helm install my-release bitnami/keycloak

These commands deploy a Keycloak application on the Kubernetes cluster in the default configuration.

Tip: List all releases using helm list

Uninstalling the Chart

To uninstall/delete the my-release deployment:

$ helm delete my-release

The command removes all the Kubernetes components associated with the chart and deletes the release.

Parameters

Global parameters

NameDescriptionValue
global.imageRegistryGlobal Docker image registry""
global.imagePullSecretsGlobal Docker registry secret names as an array[]
global.storageClassGlobal StorageClass for Persistent Volume(s)""

Common parameters

NameDescriptionValue
kubeVersionForce target Kubernetes version (using Helm capabilities if not set)""
nameOverrideString to partially override keycloak.fullname""
fullnameOverrideString to fully override keycloak.fullname""
commonLabelsLabels to add to all deployed objects{}
commonAnnotationsAnnotations to add to all deployed objects{}
clusterDomainDefault Kubernetes cluster domaincluster.local
extraDeployArray of extra objects to deploy with the release[]
diagnosticMode.enabledEnable diagnostic mode (all probes will be disabled and the command will be overridden)false
diagnosticMode.commandCommand to override all containers in the the statefulset["sleep"]
diagnosticMode.argsArgs to override all containers in the the statefulset["infinity"]

Keycloak parameters

NameDescriptionValue
image.registryKeycloak image registrydocker.io
image.repositoryKeycloak image repositorybitnami/keycloak
image.tagKeycloak image tag (immutable tags are recommended)16.1.1-debian-10-r36
image.pullPolicyKeycloak image pull policyIfNotPresent
image.pullSecretsSpecify docker-registry secret names as an array[]
image.debugSpecify if debug logs should be enabledfalse
auth.createAdminUserCreate administrator user on boottrue
auth.adminUserKeycloak administrator useruser
auth.adminPasswordKeycloak administrator password for the new user""
auth.managementUserWildfly management usermanager
auth.managementPasswordWildfly management password""
auth.existingSecretAn already existing secret containing auth info""
auth.existingSecretPerPasswordOverride existingSecret and other secret values{}
auth.tls.enabledEnable TLS encryptionfalse
auth.tls.autoGeneratedGenerate automatically self-signed TLS certificates. Currently only supports PEM certificatesfalse
auth.tls.existingSecretExisting secret containing the TLS certificates per Keycloak replica""
auth.tls.usePemUse PEM certificates as input instead of PKS12/JKS storesfalse
auth.tls.truststoreFilenameTruststore specific filename inside the existing secret""
auth.tls.keystoreFilenameKeystore specific filename inside the existing secret""
auth.tls.jksSecretDEPRECATED. Use auth.tls.existingSecret instead""
auth.tls.keystorePasswordPassword to access the keystore when it's password-protected""
auth.tls.truststorePasswordPassword to access the truststore when it's password-protected""
auth.tls.resources.limitsThe resources limits for the TLS init container{}
auth.tls.resources.requestsThe requested resources for the TLS init container{}
proxyAddressForwardingEnable Proxy Address Forwardingfalse
serviceDiscovery.enabledEnable Service Discovery for Keycloak (required if replicaCount > 1)false
serviceDiscovery.protocolSets the protocol that Keycloak nodes would use to discover new peerskubernetes.KUBE_PING
serviceDiscovery.propertiesProperties for the discovery protocol set in serviceDiscovery.protocol parameter[]
serviceDiscovery.transportStackTransport stack for the discovery protocol set in serviceDiscovery.protocol parametertcp
cache.ownersCountNumber of nodes that will replicate cached data1
cache.authOwnersCountNumber of nodes that will replicate cached authentication data1
configurationKeycloak Configuration. Auto-generated based on other parameters when not specified""
existingConfigmapName of existing ConfigMap with Keycloak configuration""
extraStartupArgsExtra default startup args""
initdbScriptsDictionary of initdb scripts{}
initdbScriptsConfigMapConfigMap with the initdb scripts (Note: Overrides initdbScripts)""
commandOverride default container command (useful when using custom images)[]
argsOverride default container args (useful when using custom images)[]
extraEnvVarsExtra environment variables to be set on Keycloak container[]
extraEnvVarsCMName of existing ConfigMap containing extra env vars""
extraEnvVarsSecretName of existing Secret containing extra env vars""

Keycloak statefulset parameters

NameDescriptionValue
replicaCountNumber of Keycloak replicas to deploy1
containerPorts.httpKeycloak HTTP container port8080
containerPorts.httpsKeycloak HTTPS container port8443
containerPorts.managementKeycloak management HTTP container port9990
podSecurityContext.enabledEnabled Keycloak pods' Security Contexttrue
podSecurityContext.fsGroupSet Keycloak pod's Security Context fsGroup1001
containerSecurityContext.enabledEnabled Keycloak containers' Security Contexttrue
containerSecurityContext.runAsUserSet Keycloak container's Security Context runAsUser1001
containerSecurityContext.runAsNonRootSet Keycloak container's Security Context runAsNonRoottrue
resources.limitsThe resources limits for the Keycloak containers{}
resources.requestsThe requested resources for the Keycloak containers{}
livenessProbe.enabledEnable livenessProbe on Keycloak containerstrue
livenessProbe.initialDelaySecondsInitial delay seconds for livenessProbe300
livenessProbe.periodSecondsPeriod seconds for livenessProbe

Deploy keycloak with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has keycloak 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 chartkeycloak is pinned at v7.1.6 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