You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
KeycloakRealm Resource for cozy Realm Missing After Initial CozyStack Deployment #1215
While following the documentation for Cluster Configuration and Deploy CozyStack, it’s not possible to proceed with Step 3 of the Enable OIDC guide because the 'cozy' realm is missing in the Keycloak instance.
It appears that the keycloak-configure HelmRelease should create a KeycloakRealm resource for the cozy realm, as defined in configure-kk.yaml. However, this resource is not present in my deployment:
# kubectl get KeycloakRealm -A
No resources found
This blocks the OIDC setup steps as the expected realm is not available.
If the cozy realm needs to be manually, it would be helpful to include instructions on how to do so in the documentation to avoid confusion.
I also have problems related to Keycloak and the realm cozy is not getting created.
Some kubectl commands
k -n cozy-keycloak get clusterkeycloak
NAME CONNECTED
keycloak-cozy false
k -n cozy-keycloak get ClusterKeycloakRealm
NAME AVAILABLE REALM CLUSTER-KEYCLOAK
keycloakrealm-cozy
The helmreleases are getting true
k -n cozy-keycloak get hr
NAME AGE READY STATUS
keycloak 40h True Helm upgrade succeeded for release cozy-keycloak/keycloak.v4 with chart [email protected]
keycloak-configure 129m True Helm upgrade succeeded for release cozy-keycloak/keycloak-configure.v4 with chart [email protected]
keycloak-operator 40h True Helm upgrade succeeded for release cozy-keycloak/keycloak-operator.v2 with chart [email protected]
And this causes my dashboard to not start.
k -n cozy-dashboard logs pods/dashboard-7777cd677d-bccmx auth-proxy
[2025/07/18 12:30:08] [options.go:77] WARNING: no explicit redirect URL: redirects will default to insecure HTTP
[2025/07/18 12:30:08] [provider.go:55] Performing OIDC Discovery...
[2025/07/18 12:30:08] [main.go:59] ERROR: Failed to initialise OAuth2 Proxy: error initialising provider: could not create provider data: error building OIDC ProviderVerifier: could not get verifier builder: error while discovery OIDC configuration: failed to discover OIDC configuration: unexpected status "404": {"error":"Realm does not exist"}
k -n cozy-keycloak get clusterkeycloak
NAME CONNECTED
keycloak-cozy true
After that the realm cozy was created and my dashboard started.
I added insecureSkipVerify: true under .spec in the keycloak-cozy
k -n cozy-keycloak edit clusterkeycloaks keycloak-cozy
I noticed that the certificate used for keycloak and dashboard is still:
Common Name (CN) Kubernetes Ingress Controller Fake Certificate
Organization (O) Acme Co
And looking at the certificates its still says False:
k -n cozy-keycloak get certificate
NAME READY SECRET AGE
web-tls False web-tls 40h
So the underlaying issue i guess is that the clusterissuer letsencrypt-prod is not able to get a signed certificate and for that i have to open up the cluster to internet and also do some DNS magic
Can confirm. I'm seeing the same behavior in my deployment.
Maybe following Step 3 of the Bootstrap an Air-Gapped Cluster Guide to add a CA Certificate could be also an option.
I could also imagine that there is an option to change the validation method from HTTP to DNS which would not require to expose the cluster directly to the internet.
Hi, VentByte (@VentByte). I'm Dosu, and I'm helping the cozystack team manage their backlog and am marking this issue as stale.
Issue Summary:
You reported that the expected 'cozy' KeycloakRealm resource was missing after deploying CozyStack, blocking OIDC setup.
Sparc0 confirmed the realm was not created initially, causing dashboard startup failures due to OIDC errors.
The root cause was identified as the clusterissuer failing to obtain a valid TLS certificate, likely due to missing internet exposure or DNS configuration.
Sparc0 resolved the issue by setting insecureSkipVerify: true in the ClusterKeycloak spec.
You suggested improvements like adding a CA certificate or switching validation from HTTP to DNS to avoid exposing the cluster.
Next Steps:
Please confirm if this issue is still relevant with the latest version of CozyStack; if so, you can keep the discussion open by commenting here.
Otherwise, I will automatically close this issue in 7 days.
Activity
Sparc0 commentedon Jul 18, 2025
I also have problems related to Keycloak and the realm cozy is not getting created.
Some kubectl commands
The helmreleases are getting true
And this causes my dashboard to not start.
Sparc0 commentedon Jul 18, 2025
I was able to get it connected
After that the realm cozy was created and my dashboard started.
I added insecureSkipVerify: true under .spec in the keycloak-cozy
I noticed that the certificate used for keycloak and dashboard is still:
And looking at the certificates its still says False:
So the underlaying issue i guess is that the clusterissuer letsencrypt-prod is not able to get a signed certificate and for that i have to open up the cluster to internet and also do some DNS magic
VentByte commentedon Jul 28, 2025
Can confirm. I'm seeing the same behavior in my deployment.
Maybe following Step 3 of the Bootstrap an Air-Gapped Cluster Guide to add a CA Certificate could be also an option.
I could also imagine that there is an option to change the validation method from HTTP to DNS which would not require to expose the cluster directly to the internet.
dosubot commentedon Oct 27, 2025
Hi, VentByte (@VentByte). I'm Dosu, and I'm helping the cozystack team manage their backlog and am marking this issue as stale.
Issue Summary:
insecureSkipVerify: truein the ClusterKeycloak spec.Next Steps:
Thanks for your understanding and contribution!