apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: nginx
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/rewrite-target: /
    nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
spec:
  tls:
    - hosts:
        - lexicolatin.com
        - www.lexicolatin.com
        # - server.lexicolatin.com
        # - kibana.lexicolatin.com
        # - database.lexicolatin.com
      secretName: tls
  rules:
    - host: lexicolatin.com
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: web
                port:
                  number: 3000
    - host: www.lexicolatin.com
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: web
                port:
                  number: 3000
    # - host: server.lexicolatin.com
    #   http:
    #     paths:
    #       - backend:
    #           service:
    #             name: server
    #             port:
    #               number: 3001
    # - host: kibana.lexicolatin.com
    #   http:
    #     paths:
    #       - backend:
    #           service:
    #             name: kibana
    #             port:
    #               number: 5601
    # - host: database.lexicolatin.com
    #   http:
    #     paths:
    #       - backend:
    #           service:
    #             name: database
    #             port:
    #               number: 5432
