apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: nexus
  annotations:
    kubernetes.io/ingress.class: "nginx"
    nginx.ingress.kubernetes.io/rewrite-target: /
    kubernetes.io/tls-acme: "true"
spec:
  tls:
  - hosts:
    - docker.my.com
    - nexus.my.com
    secretName: server-tls
  rules:
    - host: nexus.my.com
      http:
        paths:
        - path: /
          pathType: Prefix
          backend:
            service:
              name: nexus
              port:
                number: 8081
    - host: docker.my.com
      http:
        paths:
        - path: /
          pathType: Prefix
          backend:
            service:
              name: nexus
              port:
                number: 5000