Quick Start
This document helps new users quickly understand and use the Keycloak feature.
TOC
PrerequisitesDeploying a Keycloak InstanceStep 1: Create the Database SecretStep 2: Deploy PostgreSQL (Development Only)Step 3: Create the Keycloak InstanceStep 4: Verify the InstanceAccessing the Admin ConsoleNext StepsPrerequisites
Before deploying a Keycloak instance, ensure the Alauda Build of Keycloak Operator is installed. See Install for installation instructions.
Deploying a Keycloak Instance
After the Operator is installed, deploy a Keycloak instance by creating the required Kubernetes resources.
Step 1: Create the Database Secret
Create a Secret to store the PostgreSQL credentials:
Step 2: Deploy PostgreSQL (Development Only)
The following PostgreSQL configuration uses emptyDir storage, which does not persist data across Pod restarts. For production environments, replace emptyDir with a PersistentVolumeClaim.
Step 3: Create the Keycloak Instance
The spec.unsupported.podTemplate field merges arbitrary Kubernetes Pod template properties directly into the managed Pod. This field is not officially supported by the Keycloak Operator — the Operator may override or ignore settings provided here during reconciliation. In this Quick Start, it is used to inject a security context that enforces non-root execution and drops Linux capabilities. For production deployments, prefer using the operator's dedicated security fields when available.
Apply the manifest:
Step 4: Verify the Instance
Check the instance status:
When the READY column shows true, the instance is running successfully.
Accessing the Admin Console
When deploying Keycloak, the Operator generates a random initial administrator username and password and stores them as a Secret in the same namespace as the Keycloak CR. The Secret name follows the pattern <keycloak-cr-name>-initial-admin.
Retrieve the initial credentials:
For development access, use port forwarding:
Then access the Admin Console at http://localhost:8080.
Next Steps
After your Keycloak instance is running, you can:
- Expose it externally: Configure Ingress and TLS for production access.
- Create Keycloak instances with more options: See Create Instance for high-availability configuration.