I am currently running Kong via Helm inside of a Google Kubernetes Engine (GKE) cluster. I have created the following Kubernetes Ingress Controller which forwards traffic to two services based on paths.
I noticed a very strange behaviour that the ingress controller works only half the time i.e. when accessing /api/foo
, half the time I would be forwarded to bar-service
and the other half of the time I would be forwarded to the correct foo-service
, and vice versa.
Have I configured my Ingress correctly? Thank you!
kind: Ingress
apiVersion: extensions/v1beta1
metadata:
name: kong-ingress
annotations:
kubernetes.io/ingress.allow-http: "true"
kubernetes.io/ingress.class: "kong"
spec:
rules:
- http:
paths:
- path: /api/foo
backend:
serviceName: foo-service
servicePort: 8080
- path: /
backend:
serviceName: bar-service
servicePort: 8080