Skip to main content

Keycloak Server Setup

Keycloak (via the codecentric keycloakx chart) is an open-source identity and access management server: OIDC/SAML login, realms, users, and identity provider brokering.

Why it's in KubeAid

KubeAid uses Keycloak as the OIDC provider for cluster access (kubectl oidc-login, group-based RBAC) and for other applications in the stack that need SSO (e.g. Harbor's OIDC login). It depends on a Postgres instance — see Migrating Zalando PGSQL to CNPG Postgres for the current recommended backing database.

Welcome to the Keycloak Helm Chart & Server Setup Documentation.

Table of Contents (Index)


1. Quick Start: Admin Password Generation

Generate Keycloak admin password (fallback user).

NOTE: Do not set the admin password from the WebUI; pass it via environment variable KEYCLOAK_PASSWORD.

openssl rand -base64 14 > ./keycloak_password

# Sealed Secret approach
kubectl create secret generic keycloak-admin -n keycloak --dry-run=client --from-file=KEYCLOAK_PASSWORD=./keycloak_password -o json > mysecret.json
kubeseal --controller-name sealed-secrets --controller-namespace system < mysecret.json > keycloak-admin.json

Documentation Modules Overview

Detailed step-by-step guides are organized into focused topics under the doc/ directory:

SectionTopicDescription
🔐 IdP Integrationsdoc/idp-integrations.mdIntegrating Google, Azure AD, and Keycloak-to-Keycloak identity brokering.
☸️ Kubernetes Integrationdoc/kubernetes-integration.mdoidc-login setup, kubeconfig configuration, and group-based Cluster RBAC.
👥 Realm & User Managementdoc/realm-user-management.mdRealm creation, user administration, YubiKey (WebAuthn) 2FA, and SMTP email setup.
🎨 Customization & Pluginsdoc/customization-plugins.mdCustom UI login theme and Webhook event plugin configuration.
🛠️ Operations & Recoverydoc/operations-maintenance.mdUpgrade guide, realm export/import DR, Zalando-to-CNPG DB migration, & troubleshooting.