apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  namespace: default
  name: hello-ingress
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /$1
    nginx.ingress.kubernetes.io/ssl-redirect: 'true'
spec:
  tls:
    - hosts:
        - nginx.k8s.way2hacker.com
      secretName: nginx-tls-secret
  rules:
    - host: nginx.k8s.way2hacker.com
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: web
                port:
                  number: 8080
          - path: /v2
            pathType: Prefix
            backend:
              service:
                name: web2
                port:
                  number: 8080