Issues routing by host name

When I ingresses/KongIngresses for 2 separate hosts:

Ingresses:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: hosta-portal
namespace: devops
annotations:
konghq.com/override: https-only
konghq.com/plugins: hosta-allowed-ips
kubernetes.io/ingress.class: kong
spec:
tls:
- hosts:
- hosta.com
secretName: hosta-tls-csi
rules:
- host: hosta.com
- http:
paths:
- path: /
pathType: ImplementationSpecific
backend:
service:
name: hosta-portal
port:
number: 80

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: hostb-portal
namespace: devops
annotations:
konghq.com/override: https-only
kubernetes.io/ingress.class: kong
spec:
tls:
- hosts:
- hostb.com
secretName: hostb-tls-csi
rules:
- host: hostb.com
- http:
paths:
- path: /
pathType: ImplementationSpecific
backend:
service:
name: hostb-portal
port:
number: 80

Kong Ingresses:
apiVersion: configuration.konghq.com/v1
kind: KongIngress
metadata:
name: hosta-portal
namespace: devops
route:
hosts: hosta.com
https_redirect_status_code: 302
path_handling: v0
preserve_host: true
protocols:
- https
strip_path: true

apiVersion: configuration.konghq.com/v1
kind: KongIngress
metadata:
name: hostb-portal
namespace: devops
route:
hosts: hostb.com
https_redirect_status_code: 302
path_handling: v0
preserve_host: true
protocols:
- https
strip_path: true

With this definition host.com and host.com both are performing the allow ip check and both route to the same backend service.

This worked just fine before we upgraded to 2.5

What are you seeing in the generated configuration (port-forward to the Kong admin API and request /config for DB-less or /routes and /routes/ROUTE_ID/plugins for Postgres)? Does that look correct, with two routes still and appropriate plugin assignments?

If both routes are still present, can you show that configuration here along with some example requests where you include a Kong-Debug: 1 header to show matching information?

Not sure how the Kong version upgrade would have triggered this, since the controller wouldn’t generate configuration any differently for the new version.


© 2019 Kong Inc.    Terms  •  Privacy  •  FAQ