Keycloak KubeAPI Authentication Fails Keycloak KubeAPI Authentication Fails kubernetes kubernetes

Keycloak KubeAPI Authentication Fails


We have resolved the issue, below are our findings and their resolution:

  • There was a discrepancy in the token generated with KubeLogin client and Keycloak Rest API, issuer URL is hostname in the token generated with KubeLogin whereas in the token generated with Keycloak Rest API issuer URL is IP Address.
  • Also, In our(Keycloak instance) generated certificate, we have hostname as issuer name which might be the reason for getting un-authorization errors. We reconfigured the Keycloak with new certificates which have DNS name.
  • We had to create RBAC with cluster scope.