A minimal Keycloak proof-of-concept consisting of three components:
- A non-production Keycloak deployment for Kubernetes (minikube).
- A NodeJS HTTP API that leverages the
keycloak-connect
package. - A Python example client that implements the Resource Owner Password Flow.
First, create a Minikube cluster if necessary:
minikube start --cpus="max" --memory="max"
Then, run the start script. This will deploy a Compose stack with a PostgreSQL instance that is automatically initialized with a Keycloak database dump. It will also create the necessary Kubernetes resources for a minimal Keycloak deployment:
./start.sh
Finally run the tunnel to enable access to the service:
minikube tunnel
The Keycloak administration dashboard will be available on http://localhost:8080
:
- The default admin username is
$KEYCLOAK_ADMIN
inkeycloak-config.yml
. - The default admin password is
$KEYCLOAK_ADMIN_PASSWORD
insecrets.env
.
cd nodejs-api
npm install
npm run start
cd py-client
virtualenv .venv
.venv/bin/pip install -r requirements.txt
.venv/bin/python client.py