From 7cf3610e9fc71d5ed573eb2832ce0b5f043877d0 Mon Sep 17 00:00:00 2001 From: AndyMunro Date: Thu, 23 Jul 2026 11:14:20 -0400 Subject: [PATCH] Example of recovering admin user Closes #51117 Signed-off-by: AndyMunro --- docs/guides/operator/advanced-configuration.adoc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/guides/operator/advanced-configuration.adoc b/docs/guides/operator/advanced-configuration.adoc index a074e08305a5..fe3fa42ce5c4 100644 --- a/docs/guides/operator/advanced-configuration.adoc +++ b/docs/guides/operator/advanced-configuration.adoc @@ -404,6 +404,15 @@ When you create a new instance the Keycloak CR spec.bootstrapAdmin stanza may be If a master realm has already been created for your cluster, then the spec.bootstrapAdmin is effectively ignored. If you need to create a recovery admin account, then you'll need to run the CLI command against a Pod directly. +The following is an example command for recovering a temporary admin user: + +[source,bash,subs=+attributes] +---- +oc exec -it pod/cs-keycloak-0 -- bash +export KC_HTTP_MANAGEMENT_PORT=9001 +/opt/keycloak/bin/kc.sh bootstrap-admin user --username $KC_BOOTSTRAP_ADMIN_USERNAME --password:env KC_BOOTSTRAP_ADMIN_PASSWORD +---- + For more information on how to bootstrap a temporary admin user or service account and recover lost admin access, refer to the <@links.server id="bootstrap-admin-recovery"/> guide. === Tracing (OpenTelemetry)