How to setup ingress for multiple services that changes address

I wrote the following ingress but it looks like it does not work:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ci-ingress
  namespace: ingress-ns
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /
    nginx.ingress.kubernetes.io/ssl-redirect: "false"
    nginx.ingress.kubernetes.io/backend-protocol: "HTTP"
    nginx.ingress.kubernetes.io/cors-allow-credentials: "true"
    nginx.ingress.kubernetes.io/cors-allow-headers: Authorization, origin, accept
    nginx.ingress.kubernetes.io/cors-allow-methods: GET, OPTIONS
    nginx.ingress.kubernetes.io/enable-cors: "true"
spec:
  ingressClassName: nginx
  rules:
  - 
    http:
      paths:
      - path: /web
        pathType: ImplementationSpecific
        backend:
          service:
            name: hello-nginx-expose-reference
            port:
              number: 8181
      - pathType: ImplementationSpecific
        path: /jenkins
        backend:
          service:
            name: jenkins-svc-reference
            port:
              number: 8080
      
      - path: /grafana
        pathType: ImplementationSpecific
        backend:
          service:
            name: grafana-svc-reference
            port:
              number: 3000
      - path: /prometheus
        pathType: ImplementationSpecific
        backend:
          service:
            name: prometheus-svc-reference
            port:
              number: 9090

I suspected that when I am accessing Jenkins it redirects me to different address for login and also this is true for grafana and prometheus. How can I handle this effectively. But it works if it is static one page HTML file like here /web path works, since it is just a nginx welcome page.

Have you tried using “Path” rather than “ImplementationSpecific”? Also, you’re using a lot of annotations here; are you sure you need most of those?