Working with Keycloak

Overview

Answers a frequently asked question about Keycloak.

How to get Keycloak Admin Password

When Kublr setsup Kublr Platform, it automatically generates a password for the admin user. This password is saved as a Kubernetes secret, so that the Kublr Administrator can use it log in to the Keycloak Console.

Pre-requisites

You need the following executables available in your path:

  1. kubectl
  2. base64

Getting the Password

On Linux:

echo $(kubectl get secret -n kublr kcp-keycloak-secret -o jsonpath='{.data.password}' | base64 -d)

On MacOS:

echo $(kubectl get secret -n kublr kcp-keycloak-secret -o jsonpath='{.data.password}' | base64 -D)

The link to Keycloak is available on the System Cluster Overview tab.

The Secret object storing the KeyCloak master password changed between Kublr 1.16 and 1.17 releases, so for pre-1.17 Kublr use the following commands:

# Linux
echo $(kubectl get secret -n kublr kcp-keycloak-master -o jsonpath='{.data.keycloakPass}' | base64 -d)

# MacOS
echo $(kubectl get secret -n kublr kcp-keycloak-master -o jsonpath='{.data.keycloakPass}' | base64 -D)

Additional information

  1. Keycloak Documentation