Elastic
Nginx does not use service to route traffic
ref The NGINX ingress controller does not use Services to route traffic to the pods. Instead it uses the Endpoints API in order to bypass kube-proxy to allow NGINX features like session affinity and custom load balancing algorithms. It also removes some overhead, such as conntrack entries for iptables DNAT.
Using ingress with Kibana
From here, since Kibana by default uses HTTPS communication and ingress expects the backend service it is talking to be not on HTTPS, extra settings in the annotations(in below e.g.) are required. There is another way to make it work: disable https in the Kibana configs, I tried this solution and it worked.
Example
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
# name of this ingress rule
name: es-ingress
namespace: default
annotations:
nginx.ingress.kubernetes.io/backend-protocol: HTTPS
nginx.ingress.kubernetes.io/secure-backends: "true"
ingress.kubernetes.io/ssl-passthrough: "true"
spec:
rules:
# specify the protocal, this rule should be applied for
- http:
paths:
# specify the resource path to which this rule should be applied
- path: /es
# specify the service, the request should be forwarded to
backend:
serviceName: quickstart-es-default
servicePort: 9200