apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: elasticsearch-ingress
  namespace: logging
  labels:
    name: elasticsearch-ingress
  # annotations:
  #   nginx.ingress.kubernetes.io/rewrite-target: /
spec:
  rules:
    - host: kube.xyz
      http:
        paths:
          - pathType: Prefix
            # This should match SERVER_BASEPATH defined in Kibana service
            path: "/kibana"
            backend:
              service:
                name: kibana
                port:
                  number: 5601
          - pathType: Prefix
            path: "/"
            backend:
              service:
                name: elasticsearch
                port:
                  number: 9200
