# TLS Certificate Roll - Enterprise Search Readiness probe failed - Failed to connect to Elasticsearch backend. (HTTPS/TLS)

**URL:** <https://discuss.elastic.co/t/tls-certificate-roll-enterprise-search-readiness-probe-failed-failed-to-connect-to-elasticsearch-backend-https-tls/327026>\
**Category:** Elastic Cloud on Kubernetes (ECK)\
**Created:** [March 6, 2023, 5:05am UTC](https://discuss.elastic.co/t/tls-certificate-roll-enterprise-search-readiness-probe-failed-failed-to-connect-to-elasticsearch-backend-https-tls/327026 "2023-03-06T05:05:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Glenn\_Sampson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/glenn_sampson/32/118059_2.png) [@Glenn\_Sampson](https://discuss.elastic.co/u/Glenn_Sampson)\
**Post date:** [March 6, 2023, 5:05am UTC](https://discuss.elastic.co/t/tls-certificate-roll-enterprise-search-readiness-probe-failed-failed-to-connect-to-elasticsearch-backend-https-tls/327026/1 "2023-03-06T05:05:43Z")

</div>

When rolling our CA certificates on our azure k8s clusters I noticed that our Elasticsearch is not using HTTPS/TLS.

So I have attempted to updated the yamls and apply however my enterprise search is no longer working and throwing an error

[2023-03-06T04:42:42.322+00:00][7][4004][app-server][WARN]: [pre-flight] Failed to connect to Elasticsearch backend. Make sure it is running and healthy.  
[2023-03-06T04:42:42.323+00:00][7][4004][app-server][INFO]: [pre-flight] Error: /usr/share/enterprise-search/lib/war/shared\_togo/lib/shared\_togo/elasticsearch\_checks.class:142: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target (Faraday::ClientError)

The moment I add the secret and apply, enterprise search throws the error and if i navigate to Kibana UI in my browser the "server is not ready yet".

**Elastic.yaml**

```auto
apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
  name: quickstart
  namespace: sandbox
spec:
  version: 8.5.1
  http:
    tls:
      certificate:
        secretName: ca-2023
  nodeSets:
  - name: default
    count: 1
    config:
      node.store.allow_mmap: false

```

**enterprise-search.yaml**

```auto
apiVersion: enterprisesearch.k8s.elastic.co/v1
kind: EnterpriseSearch
metadata:
  name: enterprise-search-quickstart
  namespace: sandbox
spec:
  version: 8.5.1
  count: 1
  elasticsearchRef:
    name: quickstart
  http:
    tls:
      certificate:
        secretName: ca-2023

```

**kibana.yaml**

```auto
apiVersion: kibana.k8s.elastic.co/v1
kind: Kibana
metadata:
  name: quickstart
  namespace: sandbox
spec:
  version: 8.5.1
  count: 1
  elasticsearchRef:
    name: quickstart
  enterpriseSearchRef:
    name: enterprise-search-quickstart
  http:
    tls:
      certificate:
        secretName: ca-2023

```

What is wrong in my setup please?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 3, 2023, 5:06am UTC](https://discuss.elastic.co/t/tls-certificate-roll-enterprise-search-readiness-probe-failed-failed-to-connect-to-elasticsearch-backend-https-tls/327026/2 "2023-04-03T05:06:16Z")

</div>

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