apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: website
  annotations:
    kubernetes.io/ingress.class: "nginx"
spec:
  rules:
  - http:
      paths:
      - path: /
        pathType: Prefix 
        backend:
          service:
            name: frontend
            port:
              name: http
      - path: /api
        pathType: Prefix 
        backend:
          service:
            name: backend
            port:
              name: http
