How to Install Keycloak on ibm cloud

Chirag Deol
6 min readJan 19, 2021

--

Keycloak is an open source Identity and Access Management solution aimed at modern applications and services. It makes it easy to secure applications and services with little to no code. This page gives a brief introduction to Keycloak and some of the features.This tutorial will show you how to install Keycloak on IBM Cloud

Before you begin

You MUST have a user ID that is a member or an owner of an IBM Cloud account. To get an IBM Cloud user ID, go to: Please register here.

Step 1: Provision Kubernetes Cluster

  • Click the Catalog button on the top
  • Select Service from the catalog
  • Select Service from the catalog
  • Search for Kubernetes Service and click on it

On the Kubernetes deployment page, you need to specify some details about the cluster

Choose a plan; standard or free, the free plan only has one worker node and no subnet. To provision a standard cluster, you will need to upgrade your account to Pay-As-You-Go

To upgrade to a Pay-As-You-Go account, complete the following steps:

In the console,

  • go to Manage > Account.
  • Select Account settings and click Add credit card.
  • Enter your payment information,
  • Click Next, and submit your information

Choose Classic or VPC, read the docs and choose the most suitable type for yourself

Now choose your location settings, for more information please visit Locations

Choose Geography (continent)

Choose Single or Multizone,

In single zone your data is only kept on datacenter. On the other hand with Multizone, it is distributed to multiple zones thus safer in an unforeseen zone failure.

If you wish to use Multizone, please set up your account with VRF or enable Vlan spanning

If at your current location selection there is no available Virtual LAN, a new Vlan will be created for you

Choose a worker node setup or use the pre-selected one. Set worker node amount per zone

Choose Master Service Endpoint, In VRF-enabled accounts,

You can choose private-only to make your master accessible on the private network or via VPN tunnel.

Choose public-only to make your master publicly accessible. When you have a VRF-enabled account, your cluster is set up by default to use both private and public endpoints. For more information visit endpoints.

Give cluster a name

Specify the desired tags for your cluster, for more information visit tags

Click create

Wait for your cluster to be provisioned and your cluster should be ready for use within the next few minutes.

Step 2: Deploy IBM Cloud Block Storage plug-in

The Block Storage plug-in is a persistent, high-performance iSCSI storage that you can add to your apps by using Kubernetes Persistent Volumes (PVs).

  • Click the Catalog button on the top
  • Select Software from the catalog
  • Search for IBM Cloud Block Storage plug-in and click on it

On the application page

  • Click in the dot next to the cluster, you wish to use
  • Click on Enter or Select Namespace and choose the default Namespace or use a custom one

if you get an error please wait for about 30 minutes for the cluster to finalize

Give a name to this workspace

Click install and wait for the deployment

Step 3: Deploy Keycloak

We will deploy Keycloak on our cluster

  • Click the Catalog button on the top
  • Select Software from the catalog
  • Search for Keycloak and click on it

Please select IBM Kubernetes Service

On the application page

  • Click in the dot next to the cluster you wish to use
  • Click on Enter or Select Namespace and choose the default Namespace. You can also use a custom one
  • Give a unique name to workspace, which you will easily recognize

Select which resource group you want to use. It is for access control and billing purposes. For more information please visit resource groups

Give tags to your Keycloak. For more information visit tags

Click on Parameters with default values, You can set deployment values or use the default ones

Enter the Admin password in Parameters.

After finishing everything, tick the box next to the agreements and click install

  • The Keycloak workspace will start installing. Please wait for a couple of minutes
  • Your Keycloak workspace will be successfully deployed

Verify Keycloak installation

· Go to Resources in your browser

· Click on Clusters

· Click on your Cluster

Now that you are at you clusters overview, click on Actions and Web terminal from the dropdown menu

Click install and wait for a couple of minutes

  • Click on Actions
  • Click Web terminal → a terminal will open up
  • Type in the terminal, please change NAMESPACE to the namespace you choose at the deployment setup:
$ kubectl get ns
$ kubectl get pod -n NAMESPACE -o wide$ kubectl get service -n NAMESPACE

Open the Keycloak application web page in browser using external IP shown in above command.

Sign up to discover human stories that deepen your understanding of the world.

--

--

No responses yet

Write a response