Cannot expose Enterprise Search together with Kibana and Elasticsearch using Ingress controller - ESS POD crashes

Hi all,

I am using ECK 2.9.0. I'll try to set up a cluster containt Elasticsearch, Kibana and Enterprise Search. The cluster runs well.

No I want ro expose Elasticsearch, Kibana and Enterprise Search via Ingress controller to the outside.

Exposing Kibana is running fine. I am using that manifest below:

---
apiVersion: kibana.k8s.elastic.co/v1
kind: Kibana
metadata:
  name: kibana
  namespace: srv247
spec:
  version: 8.10.2
  elasticsearchRef:
    name: elasticsearch
  enterpriseSearchRef:
    name: enterprise-search
  count: 1
  http:
    service:
      spec:
        type: ClusterIP
    tls:
      selfSignedCertificate:
        disabled: true

And of course I definied an Ingress controller. Here is a snippet of my configuration:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ess-kibana-ingress
  namespace: test
spec:
  ingressClassName: ambassador
  rules:
  - host: <secret>
    http:
      paths:
      - backend:
          service:
            name: kibana-kb-http
            port:
              number: 5601
        path: /
        pathType: Prefix
  tls:
  - hosts:
    - <secret>
    secretName: ess-kibana-ingress-tls
---

I can also expose Elasticsearch to the outside with the identical Kibana approach:

---
apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
  name: elasticsearch
  namespace: srv247
spec:
  version: 8.10.2
  http:
    service:
      spec:
        type: ClusterIP
    tls:
      selfSignedCertificate:
        disabled: true

Once Elasticsearch and Kibana are running I tried to modify the configuration for Enterprise Search in the same way like Kibana and Elasticsearch.

apiVersion: enterprisesearch.k8s.elastic.co/v1
kind: EnterpriseSearch
metadata:
  name: enterprise-search
  namespace: srv247
spec:
  version: 8.10.2
  elasticsearchRef:
    name: elasticsearch
  count: 1
  config:
          #elasticsearch.ssl.enabled: true
  http:
    service:
      spec:
        type: ClusterIP
    tls:
      selfSignedCertificate:
        disabled: true

But the Pod crashes always. The erros message is:

Enterprise Search is starting...
[2024-02-16T10:57:48.231+00:00][7][4004][app-server][INFO]: Elastic Enterprise Search version=8.10.2, JRuby version=9.3.3.0, Ruby version=2.6.8, Rails version=6.1.7.4
[2024-02-16T10:57:51.201+00:00][7][4004][app-server][ERROR]:
--------------------------------------------------------------------------------

Invalid config file (/usr/share/enterprise-search/config/enterprise-search.yml):
The setting '#/elasticsearch/host' must use https if '#/elasticsearch/ssl/enabled' is 'true', but the given value is 'http://elasticsearch-es-http.<secret>.svc:9200'

--------------------------------------------------------------------------------

I thougth that ECK is using the elasticsearchRef parameter to get the URL. I also tried elasticsearch.ssl.enabled: true and set also elasticsearch.host to the https URL without any access.

Does anybody has an idea how to use Ingress controller with also provides TLS in combination with exposed Kibana, Enterprise Search and Elasticsearch?

Best regards

Sebastian

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.