Manage Realms
A Realm is the primary isolation unit in Keycloak. Each Realm has independent users, clients, roles, and authentication configuration. Alauda Build of Keycloak supports managing Realms both through the Admin Console and declaratively via the KeycloakRealmImport CRD.
TOC
Import a Realm via CRDProcedureUsing Placeholders for SecretsManage Realm Settings via Admin ConsoleAccess Realm SettingsKey Realm SettingsConfigure Token LifespansImport a Realm via CRD
The KeycloakRealmImport CRD enables GitOps-friendly, declarative Realm management. When you create a KeycloakRealmImport resource, the Operator triggers an import Job that loads the Realm configuration into the target Keycloak instance.
Procedure
Create a KeycloakRealmImport resource:
Apply the manifest:
Check the import status:
When the output is True, the Realm has been imported successfully.
Using Placeholders for Secrets
The spec.placeholders field allows you to inject Secret values into the Realm configuration at import time, avoiding hardcoded credentials in the CR:
Manage Realm Settings via Admin Console
Access Realm Settings
- Log in to the Keycloak Admin Console.
- Select the target Realm from the top-left dropdown.
- Click Realm Settings in the left navigation bar.
Key Realm Settings
Configure Token Lifespans
Token lifespans control how long issued tokens remain valid. Shorter lifespans improve security but require more frequent token refresh operations.