Instance creation failure with KeyCloak Operator (Postgres POD won't start)

I am following the tutorial below trying to install KeyCloak on my Qubinode OpenShift cluster (v4.6.17) and using the OCP GUI for all steps.

Installing Keycloak on Openshift | DevNation Lessons - YouTube

I created a new project KeyCloak and installed the KeyCloak Operator (v12.0.3) from OperatorHub without issue.

From the operator I "Create Instance” and take all the default settings leaving blank what is blank by default.

The status changes to Phase: initializing and then I navigate to the Pods view to get more details.

keyCloak-0 and keycloak-operator-xxx are Running (only keycloak-operator-xxx is Ready)

keycloak-postgresql-xx pod is stuck in Pending state and after waiting for quite some time I switch to the logs view for the pod and it just sits there like it is trying to load but can’t. After quite some time I get a “Error Loading :Failed to fetch Please try again.” message

So the Postgres Pod is stuck in Pending state with no logs to describe why. Any help appreciated!

I found the solution to this problem and posting the answer here for anyone else who may need it. I got a pointer in the right direction from this link:

RH-SS0 Operator 7.4.5 Keycloak not passing Storage class information to PVC (Persistent Volume Claim) - Red Hat Customer Portal

It seems from this post that some recent changes were made to the operator where the “Create Instance” api call requires the storageClassName parameter.

So - in your cluster - do an oc get storageclasses and then use the name of the Storage Class you want the Postgres instance to bind against as a required param for the operator “Create Instance” call.