---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ingress-with-external-name
  namespace: default

spec:
  ingressClassName: nginx
  rules:
    - host: external.localhost
      http:
        paths:
          - path: /external-with-matching-port
            pathType: Exact
            backend:
              service:
                name: external
                port:
                  number: 80
          - path: /external-with-matching-named-port
            pathType: Exact
            backend:
              service:
                name: external
                port:
                  name: http
          - path: /external-with-non-matching-port
            pathType: Exact
            backend:
              service:
                name: external
                port:
                  number: 3000
          - path: /external-with-non-matching-named-port
            pathType: Exact
            backend:
              service:
                name: external
                port:
                  name: foo
