简体   繁体   中英

Wrong Base URL Keycloak Deploy on AWS EKS

i have a problem when deploy the Keycloak Server on AWS EKS here is my configuration:

Deployment.yaml

 apiVersion: apps/v1 kind: Deployment metadata: name: my-keycloak spec: replicas: 1 selector: matchLabels: app: my-keycloak template: metadata: labels: app: my-keycloak spec: containers: - name: my-keycloak image: jboss/keycloak imagePullPolicy: IfNotPresent ports: - containerPort: 8080 name: http - containerPort: 8443 name: https env: - name: PROXY_ADDRESS_FORWARDING value: "true"

Service.yaml

 apiVersion: v1 kind: Service metadata: name: my-keycloak spec: selector: app: my-keycloak ports: - port: 8080 targetPort: 8080 name: http

Ingress.yaml

 apiVersion: extensions/v1beta1 kind: Ingress metadata: labels: app: my-keycloak name: my-keycloak-ingress spec: rules: - host: mykecloak.com http: paths: - backend: serviceName: my-keycloak servicePort: 8080

but the base url always set to this, which is false and not work. What i want that the base url should be https://mykeycloak.com/ * (with https and without the port number)

current-deployment

Many people said that the solution is set the PROXY_ADDRESS_FORWARDING to TRUE , but it doesnot work for me. Is there something i miss?

Thanks for your help

You need to add the path /*

- host: mykeycloak.com
  http:
    paths:
      - path: /*
        backend:
          serviceName: my-keycloak
          servicePort: 8080

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM