Make Kong Manger GUI to make call to /kong-manager

71 Views Asked by At

I have install kong using below command:

helm install kong kong/kong  --set admin.useTLS=false,admin.enabled=true,admin.http.enabled=true

I then created ingress for admin and manager:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: kong-admin-ingress
  annotations:
    kubernetes.io/ingress.class: 'kong'
spec:
  rules:
    - host: localhost
      http:
        paths:
          - path: /kong-admin
            pathType: Prefix
            backend:
              service:
                name: kong-kong-admin
                port:
                  number: 8001
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: kong-manager-ingress
  annotations:
    kubernetes.io/ingress.class: 'kong'
spec:
  rules:
    - host: localhost
      http:
        paths:
          - path: /kong-manager
            pathType: Prefix
            backend:
              service:
                name: kong-kong-manager
                port:
                  number: 8002

But when I nagigate to http://localhost/kong-manager, I get below errors:

enter image description here

How I can make the kong-manager to make the request to localhost/kong-manager rather http://localhost?

I found below link, but not sure how to do that with helm values: https://docs.konghq.com/gateway/latest/kong-manager/enable/

1

There are 1 best solutions below

0
confusedWarrior On

It turned out, I can pass the host/path of manager and admin api as env values:

helm install kong kong/kong  --set admin.useTLS=false,admin.enabled=true,admin.http.enabled=true,env.admin_gui_path=/kong-manager,env.admin_gui_url=http://localhost/kong-manager,env.admin_gui_api_url=http://localhost/kong-admin