How to configure 2 different domain names to the hostname and admin console?

Hi team,

I’m running Keycloak via K8S and I need to be able to configure the admin console url with different domain than the hostname url.

I reviewed the following guide:
https://www.keycloak.org/server/hostname
Including the guide about the proxy.

Nothing helped.
When the domain for the admin url is different I’m getting http code 405.

This is the configuration:

JAVA_OPTS_APPEND: >-
-Djgroups.thread_dumps_threshold=1 -Djboss.site.name=keycloak -Djgroups.dns.query=keycloak-headless.keycloak.svc.cluster.local

KC_CACHE: ispn
KC_CACHE_STACK: kubernetes
KC_DB: postgres
KC_DB_PASSWORD: something
KC_DB_SCHEMA: public
KC_DB_URL: >-
someurl
KC_DB_URL_HOST: >-
someurl
KC_DB_USERNAME: keycloak
KC_HEALTH_ENABLED: true
KC_HOSTNAME: app.ilan.xyz/auth
KC_HOSTNAME_ADMIN: https://keycloak-admin-stg.axisapps.io/admin
KC_HOSTNAME_STRICT: false
KC_HOSTNAME_STRICT_BACKCHANNEL: false
KC_HOSTNAME_STRICT_HTTPS: false
KC_HTTP_ENABLED: dHJ1ZQ==
KC_PROXY: edge
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: pass
PROXY_ADDRESS_FORWARDING: true
env_args: >-
start --cache-config-file=cache-ispn.xml --spi-sticky-session-encoder-infinispan-should-attach-route=false --log-console-output=json --metrics-enabled=true

Can you please assist?