keycloak
by Camunda
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.
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
| Name | Description | Value |
|---|---|---|
global.imageRegistry | Global Docker image registry | "" |
global.imagePullSecrets | Global Docker registry secret names as an array | [] |
global.storageClass | Global StorageClass for Persistent Volume(s) | "" |
Common parameters
| Name | Description | Value |
|---|---|---|
kubeVersion | Force target Kubernetes version (using Helm capabilities if not set) | "" |
nameOverride | String to partially override keycloak.fullname | "" |
fullnameOverride | String to fully override keycloak.fullname | "" |
commonLabels | Labels to add to all deployed objects | {} |
commonAnnotations | Annotations to add to all deployed objects | {} |
clusterDomain | Default Kubernetes cluster domain | cluster.local |
extraDeploy | Array of extra objects to deploy with the release | [] |
diagnosticMode.enabled | Enable diagnostic mode (all probes will be disabled and the command will be overridden) | false |
diagnosticMode.command | Command to override all containers in the the statefulset | ["sleep"] |
diagnosticMode.args | Args to override all containers in the the statefulset | ["infinity"] |
Keycloak parameters
| Name | Description | Value |
|---|---|---|
image.registry | Keycloak image registry | docker.io |
image.repository | Keycloak image repository | bitnami/keycloak |
image.tag | Keycloak image tag (immutable tags are recommended) | 16.1.1-debian-10-r36 |
image.pullPolicy | Keycloak image pull policy | IfNotPresent |
image.pullSecrets | Specify docker-registry secret names as an array | [] |
image.debug | Specify if debug logs should be enabled | false |
auth.createAdminUser | Create administrator user on boot | true |
auth.adminUser | Keycloak administrator user | user |
auth.adminPassword | Keycloak administrator password for the new user | "" |
auth.managementUser | Wildfly management user | manager |
auth.managementPassword | Wildfly management password | "" |
auth.existingSecret | An already existing secret containing auth info | "" |
auth.existingSecretPerPassword | Override existingSecret and other secret values | {} |
auth.tls.enabled | Enable TLS encryption | false |
auth.tls.autoGenerated | Generate automatically self-signed TLS certificates. Currently only supports PEM certificates | false |
auth.tls.existingSecret | Existing secret containing the TLS certificates per Keycloak replica | "" |
auth.tls.usePem | Use PEM certificates as input instead of PKS12/JKS stores | false |
auth.tls.truststoreFilename | Truststore specific filename inside the existing secret | "" |
auth.tls.keystoreFilename | Keystore specific filename inside the existing secret | "" |
auth.tls.jksSecret | DEPRECATED. Use auth.tls.existingSecret instead | "" |
auth.tls.keystorePassword | Password to access the keystore when it's password-protected | "" |
auth.tls.truststorePassword | Password to access the truststore when it's password-protected | "" |
auth.tls.resources.limits | The resources limits for the TLS init container | {} |
auth.tls.resources.requests | The requested resources for the TLS init container | {} |
proxyAddressForwarding | Enable Proxy Address Forwarding | false |
serviceDiscovery.enabled | Enable Service Discovery for Keycloak (required if replicaCount > 1) | false |
serviceDiscovery.protocol | Sets the protocol that Keycloak nodes would use to discover new peers | kubernetes.KUBE_PING |
serviceDiscovery.properties | Properties for the discovery protocol set in serviceDiscovery.protocol parameter | [] |
serviceDiscovery.transportStack | Transport stack for the discovery protocol set in serviceDiscovery.protocol parameter | tcp |
cache.ownersCount | Number of nodes that will replicate cached data | 1 |
cache.authOwnersCount | Number of nodes that will replicate cached authentication data | 1 |
configuration | Keycloak Configuration. Auto-generated based on other parameters when not specified | "" |
existingConfigmap | Name of existing ConfigMap with Keycloak configuration | "" |
extraStartupArgs | Extra default startup args | "" |
initdbScripts | Dictionary of initdb scripts | {} |
initdbScriptsConfigMap | ConfigMap with the initdb scripts (Note: Overrides initdbScripts) | "" |
command | Override default container command (useful when using custom images) | [] |
args | Override default container args (useful when using custom images) | [] |
extraEnvVars | Extra environment variables to be set on Keycloak container | [] |
extraEnvVarsCM | Name of existing ConfigMap containing extra env vars | "" |
extraEnvVarsSecret | Name of existing Secret containing extra env vars | "" |
Keycloak statefulset parameters
| Name | Description | Value |
|---|---|---|
replicaCount | Number of Keycloak replicas to deploy | 1 |
containerPorts.http | Keycloak HTTP container port | 8080 |
containerPorts.https | Keycloak HTTPS container port | 8443 |
containerPorts.management | Keycloak management HTTP container port | 9990 |
podSecurityContext.enabled | Enabled Keycloak pods' Security Context | true |
podSecurityContext.fsGroup | Set Keycloak pod's Security Context fsGroup | 1001 |
containerSecurityContext.enabled | Enabled Keycloak containers' Security Context | true |
containerSecurityContext.runAsUser | Set Keycloak container's Security Context runAsUser | 1001 |
containerSecurityContext.runAsNonRoot | Set Keycloak container's Security Context runAsNonRoot | true |
resources.limits | The resources limits for the Keycloak containers | {} |
resources.requests | The requested resources for the Keycloak containers | {} |
livenessProbe.enabled | Enable livenessProbe on Keycloak containers | true |
livenessProbe.initialDelaySeconds | Initial delay seconds for livenessProbe | 300 |
livenessProbe.periodSeconds | Period 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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartkeycloak is pinned at v7.1.6 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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