I’m trying to upgrade my keycloak image in my deployment from quay io/keycloak/keycloak:13.0.1 to quay io/keycloak/keycloak:23.0.
However, when I push my image to the cluster the pod STATUS changes from completed to crashloopbackoff.
My KC connects to a db in Azure.
After it goes into crashloopbackoff the only logs I see are.
Keycloak - Open Source Identity and Access Management
Find more information at: https://www.keycloak.org/docs/latest
Usage:
kc.sh [OPTIONS] [COMMAND]
Use this command-line tool to manage your Keycloak cluster.
Make sure the command is available on your "PATH" or prefix it with "./" (e.g.:
"./kc.sh") to execute from the current folder.
Options:
-cf, --config-file <file>
Set the path to a configuration file. By default, configuration properties are
read from the "keycloak.conf" file in the "conf" directory.
-h, --help This help message.
-v, --verbose Print out error details when running this command.
-V, --version Show version information
Commands:
build Creates a new and optimized server image.
start Start the server.
start-dev Start the server in development mode.
export Export data from realms to a file or directory.
import Import data from a directory or a file.
show-config Print out the current configuration.
tools Utilities for use and interaction with the server.
completion Generate bash/zsh completion script for kc.sh.
Examples:
Start the server in development mode for local development or testing:
$ kc.sh start-dev
Building an optimized server runtime:
$ kc.sh build <OPTIONS>
Start the server in production mode:
$ kc.sh start <OPTIONS>
Enable auto-completion to bash/zsh:
$ source <(kc.sh tools completion)
Please, take a look at the documentation for more details before deploying in
production.
Use "kc.sh start --help" for the available options when starting the server.
Use "kc.sh <command> --help" for more information about other commands.
Could anyone help me with what I might be doing wrong, or not doing here?
You missed reading the upgrade notes. With Keycloak 17 came the switch from wildfly to quarkus.
The environment variables for the quarkus distribution have an entirely different naming scheme.
Hey ThoreKr, thanks for the notes. These helped me quite a bit and I think I finally got it working. But I’m not sure why it’s been trying to update the DB for over 8 hours now.
My pod status is 1/1 Running,
The last log I see from Keycloak is
ERROR [org.keycloak.services] (main) KC-SERVICES0010: Failed to add user ‘admin’ to realm ‘master’: user with username exists
I’ve read that the ERROR log isn’t an actual error in keycloak and it appears in the new version, but from there it doesn’t really do anything. I’m trying to understand if this is something to do with my config for KC or if it’s because I’m using a basic tier db from azure where the compute power might not be enough.
The final issues I’ve had with it was my service was using ClusterIP, so I change it to NodePort.
and the Path for KC_HOSTNAME_URL & KC_HOSTNAME_ADMIN_URL had to be updated to /auth instead of /keycloak/auth.
Any chance you can post your updated YAML file (and any configmaps you had to change) for your converted deployment? I’m going through the same thing you discussed in your original post and seeing the changes you had to make would be very helpful