Exercise 4: Setup Keycloak
These setup instractions are based on Keycloak - Guide - Keycloak on Kubernetes.
The instructions go into installing an Ingress for Keycloak. But we have Istio installed and we will be using the Istio Ingress to access Keycloak externally. The original keycloak.yaml
is modified and the NodePort
has been removed.
Note: This is a "ephemeral" installation of Keycloak, there is no database used for persistance. Sufficient for a workshop but not suitable for production use!
Step 1: Deploy Keycloak
Step 2: Wait until the Keycloak Pod is started
Step 3: Access Keycloak
Get the Keycloak URL and open the URL in your browser:
Note: This will work because we created a VirtualService in the previous exercise that maps the /auth
URI to the Keycloak service.
Step 4: Try to logon to Keycloak
Click on
Administration Console
.
Login In with username
admin
and passwordadmin
.
Step 5: Create realm
For the workshop we need our pre-configured realm, we will create the realm using a bash script.
Verify your existing environment varibles
Execute the bash script
Example output:
Step 6: Verify the newly created realm
Try to create an access token, this requires the $INGRESSURL environment variable to be set:
Note: The image shows you in Kiali that we access Keycloak throuh our
istio-ingressgateway
. This is not a part of your hands-on tasks.
Congratulations, you have successfully completed the
Setup Application environment
. Awesome :star:
Optional steps to verify the configuration
STEP 1: Verify the name quarkus
of the imported realm
quarkus
of the imported realmSTEP 2: Verify the imported realm settings
STEP 3: Press view all users
view all users
You should see following users: admin
, alice
, jdoe
STEP 4: Verify the role mapping
Last updated