0

My ingress file like this and I cannot get my resources when it comes up multiple paths

And my ingress file like this:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: test-ingress
  annotations:
      nginx.ingress.kubernetes.io/rewrite: /
spec:
  ingressClassName: nginx
  rules:
  - host: foo.test.com
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: service1
            port:
              number: 80
      - path: /service2
        pathType: Prefix
        backend:
          service:
            name: service2
            port:
              number: 80

Is there anybody can help me find solutions?

kuroi_karasu
  • 263
  • 1
  • 3
  • 6
  • `...I cannot get my resources` - you need to provide full details (eg. yaml, logs) in your question. – gohm'c Dec 24 '21 at 08:46
  • The / prefix is a substring of the /service2 prefix and it will always match. I doubt you will ever receive traffic on the second service because of that – whites11 Dec 24 '21 at 09:25

0 Answers0