apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: elastic-ingress
  namespace: elastic
  annotations:
    kubernetes.io/ingress.class: "nginx"
    nginx.ingress.kubernetes.io/ssl-redirect: "true"
    nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
    nginx.ingress.kubernetes.io/proxy-body-size: "0"
    nginx.ingress.kubernetes.io/proxy-read-timeout: "600"
    nginx.ingress.kubernetes.io/proxy-send-timeout: "600"
    cert-manager.io/cluster-issuer: "letsencrypt-prod"
spec:
  tls:
    - hosts:
        - apm.badman.app
        - kibana.badman.app
      secretName: elastic-prod-certificate
  rules:
    - host: kibana.badman.app
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: elastic-kibana-kb-http
                port:
                  number: 5601
  
    - host: apm.badman.app
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: elastic-apm-apm-http
                port:
                  number: 8200
