kongkong-pluginkong-ingress

Kong Ingress default string append in URL


In my project we have configured Kong Ingress as API gateway. When we configured Ingress as follows

ingress:
  name: kong-ingress
  annotations:
    konghq.com/strip-path: "true"
  rules:
  - http:
      paths:
      - path: /api
        pathType: ImplementationSpecific
        backend:
          service:
            name: mt-amp-api-gateway
            port:
              number: 8080

But the problem is for accessing the service that is running in the endpoint /api/service/endpoint the url from the frontend is like this localhost:xxxx/api/api/service/endpoint. That I need to append 2 /api to access my actual resource. Is there a configuration to change the I can actually access like localhost:xxxx/api/service/endpoint


Solution

  • do you want to disable stip-path and enable path annotation? https://docs.konghq.com/kubernetes-ingress-controller/2.7.x/references/annotations/#konghqcompath ?

    Thank you