Connecting Enterprise Search and Kibana with ECK

When connecting Kibana and Enterprise Search, the docs say to use the host name. However, using the external DNS name that I configured for our k8s cluster does not work. I can change the host name to the internal IP address of the ES pod and the connection works.

How do configure Kibana to use the pod's name instead of IP?

apiVersion: kibana.k8s.elastic.co/v1
kind: Kibana
metadata:
  name: quickstart
  namespace: elastic-system
spec:
  version: 7.14.0
  count: 1
  elasticsearchRef:
    name: quickstart
  config:
    enterpriseSearch.host: http://10.x.x.x:3002
  http:
    tls:
      selfSignedCertificate:
        disabled: true

Hello Lane,

You can connect to another pod using the service name plus .default.svc. With your configuration named quickstart you would set:
enterpriseSearch.host: https://quickstart-ent-http.default.svc:3002

I found the service name for Enterprise Search, ent-http, by running kubectl get svc.

Here is a full Kubernetes YML that runs Elasticsearch, Kibana, and Enterprise Search, connected without the use of an IP. This YML uses the name example instead of quickstart:

apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
  name: example
spec:
  version: 7.14.2
  nodeSets:
    - name: default
      count: 1
      config:
        # Not for production use, see: https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-virtual-memory.html
        node.store.allow_mmap: false
---
apiVersion: enterprisesearch.k8s.elastic.co/v1
kind: EnterpriseSearch
metadata:
  name: example
spec:
  version: 7.14.2
  count: 1
  elasticsearchRef:
    name: example
  config:
    kibana.external_url: https://localhost:5601
  podTemplate:
    spec:
      containers:
      - name: enterprise-search
        env:
        - name: JAVA_OPTS
          value: -Xms1500m -Xmx1500m
        resources:
          requests:
            memory: 2Gi
          limits:
            memory: 2Gi
---
apiVersion: kibana.k8s.elastic.co/v1
kind: Kibana
metadata:
  name: example
spec:
  version: 7.14.2
  config:
    enterpriseSearch.host: https://example-ent-http.default.svc:3002
  count: 1
  elasticsearchRef:
    name: example
  enterpriseSearchRef:
    name: example

Hope this helps!