---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ingress-with-redirect
  namespace: default
  annotations:
    nginx.ingress.kubernetes.io/permanent-redirect: "https://www.traefik.io"
    nginx.ingress.kubernetes.io/temporal-redirect: "https://www.google.com"

spec:
  ingressClassName: nginx
  rules:
    - host: redirect.localhost
      http:
        paths:
          - path: /
            pathType: Exact
            backend:
              service:
                name: whoami
                port:
                  number: 80
