apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: nginx-app
  labels:
    app.kubernetes.io/name: nginx
    app.kubernetes.io/instance: myapp
  annotations:
    kubernetes.io/ingress.class: traefik
spec:
  rules:
    - host: "localhost"
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: nginx-app
                port:
                  number: 80