keycloak

by joaquinito2051

Helm chartv15.1.6App 21.1.2

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 install my-release oci://registry-1.docker.io/bitnamicharts/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.

Looking to use Keycloak in production? Try VMware Application Catalog, the enterprise edition of Bitnami Application Catalog.

Prerequisites

  • Kubernetes 1.19+
  • Helm 3.2.0+

Installing the Chart

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

helm install my-release oci://registry-1.docker.io/bitnamicharts/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 common.names.fullname""
fullnameOverrideString to fully override common.names.fullname""
namespaceOverrideString to fully override common.names.namespace""
commonLabelsLabels to add to all deployed objects{}
enableServiceLinksIf set to false, disable Kubernetes service links in the pod spectrue
commonAnnotationsAnnotations to add to all deployed objects{}
dnsPolicyDNS Policy for pod""
dnsConfigDNS Configuration pod{}
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)21.1.2-debian-11-r0
image.digestKeycloak image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag""
image.pullPolicyKeycloak image pull policyIfNotPresent
image.pullSecretsSpecify docker-registry secret names as an array[]
image.debugSpecify if debug logs should be enabledfalse
auth.adminUserKeycloak administrator useruser
auth.adminPasswordKeycloak administrator password for the new user""
auth.existingSecretExisting secret containing Keycloak admin password""
auth.passwordSecretKeyKey where the Keycloak admin password is being stored inside the existing secret.""
tls.enabledEnable TLS encryption. Required for HTTPs traffic.false
tls.autoGeneratedGenerate automatically self-signed TLS certificates. Currently only supports PEM certificatesfalse
tls.existingSecretExisting secret containing the TLS certificates per Keycloak replica""
tls.usePemUse PEM certificates as input instead of PKS12/JKS storesfalse
tls.truststoreFilenameTruststore filename inside the existing secretkeycloak.truststore.jks
tls.keystoreFilenameKeystore filename inside the existing secretkeycloak.keystore.jks
tls.keystorePasswordPassword to access the keystore when it's password-protected""
tls.truststorePasswordPassword to access the truststore when it's password-protected""
tls.passwordsSecretSecret containing the Keystore and Truststore passwords.""
spi.existingSecretExisting secret containing the Keycloak truststore for SPI connection over HTTPS/TLS""
spi.truststorePasswordPassword to access the truststore when it's password-protected""
spi.truststoreFilenameTruststore filename inside the existing secretkeycloak-spi.truststore.jks
spi.passwordsSecretSecret containing the SPI Truststore passwords.""
spi.hostnameVerificationPolicyVerify the hostname of the server’s certificate. Allowed values: "ANY", "WILDCARD", "STRICT".""
productionRun Keycloak in production mode. TLS configuration is required except when using proxy=edge.false
proxyreverse Proxy mode edge, reencrypt, passthrough or nonepassthrough
httpRelativePathSet the path relative to '/' for serving resources. Useful if you are migrating from older version which were using '/auth/'/
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.infinispanKeycloak infinispan container port7800
extraContainerPortsOptionally specify extra list of additional port-mappings for Keycloak container[]
podSecurityContext.enabledEnabled Keycloak pods' Security Contexttrue
`podSecurit

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 v15.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