apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ingress
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /
spec:
  rules:
    - host: localhost
      http:
        paths:
        - path: "/"
          pathType: Prefix
          backend:
            service:
              name: frontend
              port:
                number: 8080
        - path: "/api"
          backend:
            service:
              name: backend
              port:
                number: 80
          pathType: Prefix

