Installing on Minikube

Prerequisites to the installation

  • A network downstream speed of at least 10 Mbps to allow for a timely download of all necessary images and containers. A slower downstream might lead to timeouts and Pods might not start.

  • 4 CPU cores, 8 GB of free RAM and free disk space of ~100 GB to run the minikube instance with Keycloak and observability tools inside.

    If you have less available disk space, change the minikube disk size in rebuild.sh from 64 GB to a lower value.

  • The following tools need to be installed on the local machine.

    Each linked page contains an installation description and a command to verify the successful installation of the prerequisite.

After all tools are installed, continue with the next section.

Installing Keycloak Benchmark on minikube

If an existing minikube instance exists, this installation replaces it with a new one.

To set up the minikube instance with Keycloak Benchmark, invoke the following commands in this order:

  1. Check out the Git repository from https://github.com/keycloak/keycloak-benchmark/.

  2. Change to the folder provision/minikube.

  3. Run the shell script ./rebuild.sh to set up a minikube instance.

  4. Run the task command to provision all containers on minikube. This might take some time until all containers have been pulled from the internet, see Observing the installation on how to see how it progresses.

    While this can complete within 5 minutes with a fast internet downstream speed, this might take up to 15 minutes for slow connections. A network downstream slower than 10 Mbps might lead to timeouts, and Pods might not start with the error code ImagePullBackOff.

When the configuration changes later, re-run the task command, and it updates the installation. Don’t run ./rebuild.sh unless there is the need to re-create the complete Keycloak Benchmark environment as it will take a lot longer and will download all containers from the internet again.

Observing the installation

Run the following command in a separate window to see the different Pods starts. Use Ctrl+C to end watching.

kubectl get pods -A -w

Verifying the installation

The script isup.sh currently works with macOS on bash version 4 or higher. Current Bash version can be checked using the command:

bash --version

To upgrade your bash version you can use the following commands:

brew update
brew install bash

Run the following script to check if all services are running and receive a list of available URLs:

./isup.sh

To open a dashboard showing all Kubernetes resources, run the following command:

minikube dashboard

This should open the URL in the user’s default browser. If it doesn’t open it automatically, click on the link it prints on the console.

Then, select a namespace in the header (for example keycloak) and browse the resources available in that namespace.