apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ingress-services
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /$2
spec:
  rules:
    - host: learn-k8.box
      http:
        paths:
          - pathType: Prefix
            path: /api/air-quality(/|$)(.*)
            backend:
              service:
                name: air-quality-service
                port:
                  number: 3200
          - pathType: Prefix
            path: /api/geocoding(/|$)(.*)
            backend:
              service:
                name: geocoding-service
                port:
                  number: 3100

