Skip to main content

Keycloak Helm Values Reference

This page documents all configurable values for the keycloak-operator Helm chart. Values are organized by functional area.

tip

For a minimal working configuration, see the Getting Started guide. For a production HA example, see ci/prod-ha-example.yaml in the chart repository.

imagePullSecrets

KeyTypeDefaultDescription
imagePullSecretslist[]Image pull secrets applied to all pods (operator + Keycloak). Use when the chart image repository requires authentication.

Bootstrap admin helper (adminBootstrap)

A convenience helper that creates the bootstrap admin Kubernetes Secret in-cluster. Useful for development. In production, create the secret out-of-band.

KeyTypeDefaultDescription
adminBootstrap.enabledboolfalseEnable in-cluster bootstrap admin secret creation.
adminBootstrap.usernamestring"admin"Bootstrap admin username.
adminBootstrap.passwordstring""Bootstrap admin password.
warning

adminBootstrap stores credentials in plain-text Helm values. Do not use in production: create keycloak-bootstrap-admin manually or via ESO instead.

Vault integration (vault)

Syncs secrets from HashiCorp Vault via External Secrets Operator and mounts them inside the Keycloak pods.

KeyTypeDefaultDescription
vault.enabledboolfalseEnable Vault ExternalSecret creation.
vault.namestring"keycloak-vault-secrets"Name of the synced Kubernetes Secret.
vault.refreshIntervalstring"1h"How often ESO re-syncs from Vault.
vault.mountPathstring"/opt/keycloak/secrets"Path inside the pod where the secret is mounted as a volume.
vault.secretStoreRef.namestring""Name of the ESO SecretStore or ClusterSecretStore.
vault.secretStoreRef.kindstring"SecretStore"Kind: SecretStore or ClusterSecretStore.
vault.datalist[]Individual key mappings from Vault to Secret keys.
vault.dataFromlist[]Bulk-fetch all keys from a Vault path.
tip

Keycloak's file vault resolves secrets using the <realm>_<secretname> key format. For example, the keystore password for the master realm is stored as master_keystore-password and referenced in realm config as ${vault.keystore-password}.

Keystore (keystore)

Syncs a PKCS12 keystore from an external secret store and mounts it into the Keycloak pods. Used for custom token-signing keys (configure a java-keystore key provider in the realm to activate).

KeyTypeDefaultDescription
keystore.enabledboolfalseEnable keystore ExternalSecret creation.
keystore.namestring"keycloak-keystore"Name of the synced Kubernetes Secret.
keystore.refreshIntervalstring"1h"How often ESO re-syncs.
keystore.secretStoreRef.namestring""Name of the ESO SecretStore.
keystore.secretStoreRef.kindstring"SecretStore"Kind: SecretStore or ClusterSecretStore.
keystore.mountPathstring"/opt/keycloak/keystore"Path inside the pod where the keystore file is mounted.
keystore.keystoreKeystring"keystore.p12"Key in the synced Secret that holds the PKCS12 binary.
keystore.datalist[]Remote references to fetch the keystore binary.

Grafana dashboards (grafana)

Creates labeled ConfigMaps that the Grafana sidecar picks up automatically.

KeyTypeDefaultDescription
grafana.enabledboolfalseDeploy Keycloak Grafana dashboard ConfigMaps.
grafana.postgresboolfalseAlso deploy PostgreSQL dashboard ConfigMaps (requires postgres_exporter metrics).
grafana.defaultLabelbooltrueAdd the default grafana_dashboard: "1" label.
grafana.extraLabelsobject{}Additional labels to add to dashboard ConfigMaps.

PostgreSQL subchart (postgres): dev only

Deploys a single-instance PostgreSQL via the Bitnami subchart and auto-wires the Keycloak CR database connection to it.

Development only

Do not enable postgres.enabled in production. Provision PostgreSQL externally and configure the connection via keycloak.db.*.

KeyTypeDefaultDescription
postgres.enabledboolfalseDeploy the embedded PostgreSQL subchart.
postgres.auth.usernamestring"keycloak"PostgreSQL username.
postgres.auth.passwordstring""PostgreSQL password.
postgres.auth.databasestring"keycloak"PostgreSQL database name.

Keycloak Operator (operator)

Configuration for the Keycloak Operator Deployment that manages the Keycloak CR.

KeyTypeDefaultDescription
operator.enabledbooltrueDeploy the Keycloak Operator.
operator.replicaCountint1Number of operator replicas.
operator.image.repositorystring"quay.io/keycloak/keycloak-operator"Operator image repository.
operator.image.tagstring"26.6.4"Operator image tag. Bump independently from keycloak.image.tag to avoid unnecessary operator restarts during Keycloak rolling updates.
operator.image.pullPolicystring"IfNotPresent"Image pull policy.
operator.resourcesobject{}Resource requests and limits for the operator pod.
operator.service.enabledbooltrueCreate a Service for the operator.
operator.service.typestring"ClusterIP"Service type.
operator.service.portint8080Service port.
operator.serviceAccount.createbooltrueCreate a ServiceAccount for the operator.
operator.serviceAccount.annotationsobject{}Annotations for the operator ServiceAccount (e.g. for IRSA/Workload Identity).
operator.serviceAccount.namestring""Override the ServiceAccount name. Defaults to the chart fullname when empty.
operator.deploymentAnnotationsobject{}Annotations for the operator Deployment.
operator.podAnnotationsobject{}Annotations for the operator pod.
operator.podSecurityContextobject{}Pod-level securityContext for the operator pod.
operator.securityContextobject{}Container-level securityContext for the operator container.
operator.nodeSelectorobject{}Node selector for the operator pod.
operator.tolerationslist[]Tolerations for the operator pod.
operator.affinityobject{}Affinity rules for the operator pod.

Keycloak CR (keycloak)

Configuration for the Keycloak custom resource managed by the operator.

Basic settings

KeyTypeDefaultDescription
keycloak.enabledbooltrueDeploy the Keycloak CR. Set to false to deploy only the operator.
keycloak.namestring"keycloak"Name of the Keycloak CR and the resulting StatefulSet. Changing this after installation creates a new CR and abandons the old StatefulSet.
keycloak.versionstring"26.6.4"Keycloak version. Used by the operator to validate image compatibility.
keycloak.instancesint1Number of Keycloak replicas (StatefulSet). Use 2 or more for HA.
keycloak.image.repositorystring"nexus.mia-platform.eu/platform/auth/keycloak"Keycloak image repository.
keycloak.image.tagstring"0.3.2-26.6.4-postgres"Keycloak image tag. The custom Mia Platform image includes PostgreSQL JDBC driver, OTEL agent, and Vault integration.
keycloak.imagePullSecretslist~Image pull secrets for the Keycloak pods.

Bootstrap admin

KeyTypeDefaultDescription
keycloak.bootstrapAdmin.secretstring""Name of the kubernetes.io/basic-auth Secret containing the bootstrap admin credentials. Must be created before installation.

Database (keycloak.db)

All fields map directly to the Keycloak CR db spec. When postgres.enabled: true, these are auto-populated from the subchart.

KeyTypeDefaultDescription
keycloak.db.vendorstring"postgres"Database type. Currently only postgres is supported by the custom image.
keycloak.db.hoststring~Database hostname.
keycloak.db.portint~Database port.
keycloak.db.databasestring~Database name.
keycloak.db.schemastring~Database schema.
keycloak.db.urlstring~Full JDBC URL. Use instead of host/port/database when needed.
keycloak.db.usernameSecretobject~Reference to a Secret key containing the DB username ({name, key}).
keycloak.db.passwordSecretobject~Reference to a Secret key containing the DB password ({name, key}).
keycloak.db.poolInitialSizeint~Initial connection pool size.
keycloak.db.poolMinSizeint~Minimum connection pool size.
keycloak.db.poolMaxSizeint~Maximum connection pool size.

Example: external PostgreSQL:

keycloak:
db:
vendor: postgres
host: postgres.database.svc
port: 5432
database: keycloak
usernameSecret:
name: keycloak-db
key: username
passwordSecret:
name: keycloak-db
key: password

Hostname (keycloak.hostname)

KeyTypeDefaultDescription
keycloak.hostname.hostnamestring~Required. Public URL for the Keycloak instance. Must include the scheme (e.g. https://keycloak.example.com) when hostname.admin is set.
keycloak.hostname.adminstring~Admin console URL (separate hostname). Should be on a VPN-only or internal-LB address. When set, hostname.hostname must be a full URL.
keycloak.hostname.adminUrlstring~Backend admin URL for the operator. Defaults to hostname.admin when set.
keycloak.hostname.strictbooltrueReject requests that don't match the configured hostname. Disable only during initial setup.
keycloak.hostname.backchannelDynamicbool~Enable dynamic backchannel URL resolution.

HTTP (keycloak.http)

KeyTypeDefaultDescription
keycloak.http.httpEnabledbooltrueEnable plain HTTP listener. Required when TLS is terminated at the ingress/proxy layer.
keycloak.http.httpPortint~HTTP listener port (default: 8080).
keycloak.http.httpsPortint~HTTPS listener port (default: 8443).
keycloak.http.tlsSecretstring~Name of the TLS Secret for HTTPS termination at the Keycloak pod.
keycloak.httpManagement.portint~Port for the management interface (health and metrics endpoints), separate from the main HTTP/HTTPS listener.

Feature toggles (keycloak.features)

KeyTypeDefaultDescription
keycloak.features.enabledlist[]Keycloak feature flags to explicitly enable (e.g. scim).
keycloak.features.disabledlist[]Keycloak feature flags to explicitly disable.

Ingress

The chart supports two mutually exclusive ingress approaches: Kubernetes Ingress or Traefik IngressRoute.

Standard Ingress (keycloak.ingress):

KeyTypeDefaultDescription
keycloak.ingress.enabledboolfalseCreate a standard Kubernetes Ingress.
keycloak.ingress.classNamestring""Ingress class name (e.g. nginx).
keycloak.ingress.annotationsobject{}Ingress annotations.
keycloak.ingress.tlsSecretstring""TLS secret name for the Ingress.

Admin Ingress (keycloak.adminIngress): used when hostname.admin points to a separate domain:

KeyTypeDefaultDescription
keycloak.adminIngress.enabledboolfalseCreate a separate admin Ingress. Must be on an internal/VPN hostname.
keycloak.adminIngress.classNamestring""Ingress class name (e.g. nginx-internal).
keycloak.adminIngress.annotationsobject{}Ingress annotations.
keycloak.adminIngress.tlsSecretstring""TLS secret name.

Traefik IngressRoute (keycloak.ingressRoute / keycloak.adminIngressRoute):

KeyTypeDefaultDescription
keycloak.ingressRoute.enabledboolfalseCreate a Traefik IngressRoute for the main hostname.
keycloak.ingressRoute.entryPointslist["websecure"]Traefik entry points to attach.
keycloak.adminIngressRoute.enabledboolfalseCreate a Traefik IngressRoute for the admin hostname.
keycloak.adminIngressRoute.entryPointslist["websecure"]Traefik entry points for the admin route.

Resources and scheduling

KeyTypeDefaultDescription
keycloak.resources.requests.cpustring"500m"CPU request.
keycloak.resources.requests.memorystring"512Mi"Memory request.
keycloak.resources.limits.cpustring"2"CPU limit.
keycloak.resources.limits.memorystring"1536Mi"Memory limit.
keycloak.schedulingobject~Full Kubernetes scheduling spec (affinity, tolerations, topologySpreadConstraints). When null, the chart injects a default pod anti-affinity by topology.kubernetes.io/zone.
keycloak.podDisruptionBudget.enabledboolfalseCreate a PodDisruptionBudget.
keycloak.podDisruptionBudget.minAvailableint/string-Minimum available pods during disruptions.
keycloak.podDisruptionBudget.maxUnavailableint/string-Maximum unavailable pods during disruptions.
keycloak.livenessProbe.failureThresholdint~Failure threshold for the liveness probe before restarting the pod.
keycloak.livenessProbe.periodSecondsint~Interval between liveness probe checks.
keycloak.readinessProbe.failureThresholdint~Failure threshold for the readiness probe before removing the pod from Service endpoints.
keycloak.readinessProbe.periodSecondsint~Interval between readiness probe checks.
keycloak.startupProbe.failureThresholdint~Failure threshold for the startup probe before the pod is considered failed.
keycloak.startupProbe.periodSecondsint~Interval between startup probe checks.
keycloak.networkPolicyobject~Pass-through NetworkPolicy spec managed by the operator for the Keycloak pods.

Example: HA with PDB and topology spread:

keycloak:
instances: 3

scheduling:
topologySpreadConstraints:
- maxSkew: 1
topologyKey: topology.kubernetes.io/zone
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
app.kubernetes.io/instance: keycloak
app.kubernetes.io/managed-by: keycloak-operator

podDisruptionBudget:
enabled: true
minAvailable: 2

Update strategy

KeyTypeDefaultDescription
keycloak.update.strategystring"Auto"Keycloak CR update strategy. Auto performs a rolling update for patch-level version bumps and falls back to recreate for minor/major bumps. RecreateOnImageChange always recreates (downtime on any image change).

Monitoring

KeyTypeDefaultDescription
keycloak.serviceMonitor.enabledbooltrueEnable Prometheus ServiceMonitor creation (via the Keycloak Operator).
keycloak.serviceMonitor.intervalstring"15s"Prometheus scrape interval.

Telemetry and tracing

KeyTypeDefaultDescription
keycloak.telemetry.endpointstring-OpenTelemetry collector endpoint (e.g. http://otel-collector.monitoring.svc:4317).
keycloak.telemetry.serviceNamestring-Service name for OTEL spans.
keycloak.telemetry.protocolstring-OTEL protocol: grpc (default) or http/protobuf.
keycloak.tracing.enabledbool-Enable Keycloak distributed tracing.
keycloak.tracing.endpointstring-Tracing collector endpoint.
keycloak.tracing.protocolstring-Tracing protocol: grpc or http/protobuf.

Additional options

KeyTypeDefaultDescription
keycloak.additionalOptionslist[]Extra Keycloak server options as {name, value} objects. Applied after chart-injected defaults (log-console-output: json, metrics-enabled, etc.).
keycloak.envlist[]Extra environment variables injected into the Keycloak container.
keycloak.proxy.headersstring"xforwarded"Proxy headers mode: xforwarded or forwarded. Required when running behind a load balancer.
keycloak.transaction.xaEnabledboolfalseEnable XA transactions. Disable when the database does not support XA (e.g. PgBouncer in transaction mode).
keycloak.cacheobject{}Keycloak Infinispan cache configuration.
keycloak.truststoresobject{}Trust store configuration for outbound TLS (e.g. LDAP, identity providers).
keycloak.unsupportedobject{}Unsupported podTemplate overrides for direct pod spec patching.
keycloak.startOptimizedbooltrueUse the optimized start mode (pre-built image). Set to false when using a non-optimized image.

Realm imports (realms)

KeyTypeDefaultDescription
realmslist[]List of KeycloakRealmImport CR definitions. Iterate this list to create realm import resources. In most deployments, realms are managed via the keycloak-realm-management chart instead.

Complete production example

# keycloak-prod-values.yaml
keycloak:
instances: 2

imagePullSecrets:
- name: nexus-pull-secret

hostname:
hostname: https://keycloak.example.com
admin: https://keycloak-admin.internal.example.com
strict: true

ingress:
enabled: true
className: nginx
tlsSecret: keycloak-tls

adminIngress:
enabled: true
className: nginx-internal
tlsSecret: keycloak-admin-tls

http:
httpEnabled: true

proxy:
headers: xforwarded

db:
vendor: postgres
host: postgres.database.svc
port: 5432
database: keycloak
usernameSecret:
name: keycloak-db
key: username
passwordSecret:
name: keycloak-db
key: password

bootstrapAdmin:
secret: keycloak-bootstrap-admin

resources:
requests:
cpu: 500m
memory: 512Mi
limits:
cpu: "2"
memory: 1536Mi

podDisruptionBudget:
enabled: true
minAvailable: 1

serviceMonitor:
enabled: true
interval: 15s