# Kibana unable to use elastic-http-public cert

**URL:** <https://discuss.elastic.co/t/kibana-unable-to-use-elastic-http-public-cert/233805>\
**Category:** Elastic Cloud on Kubernetes (ECK)\
**Created:** [May 21, 2020, 8:05pm UTC](https://discuss.elastic.co/t/kibana-unable-to-use-elastic-http-public-cert/233805 "2020-05-21T20:05:39Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![aman26ps](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aman26ps/32/82604_2.png) [@aman26ps](https://discuss.elastic.co/u/aman26ps)\
**Post date:** [May 21, 2020, 8:05pm UTC](https://discuss.elastic.co/t/kibana-unable-to-use-elastic-http-public-cert/233805/1 "2020-05-21T20:05:40Z")

</div>

hi team,

I would like to enable HTTPS communication between kibana and elasticsearch , but i am not able to do that

kibana config --\>

```auto
    count: 1
    config:
      elasticsearch.ssl.certificateAuthorities: /mnt/usr/ca.crt
    elasticsearchRef:
      name: "elasticsearch-config"
    http:
     service:
       spec:
         type: LoadBalancer
     tls:
       certificate:
         secretName: elasticsearch-config-es-http-certs-public
    # this shows how to customize the Kibana pod
    # with labels and resource limits
    podTemplate:
      metadata:
        labels:
          kibana: node
      spec:
        containers:
        - name: kibana
          volumeMounts:
          - name: certs
            mountPath: /mnt/usr
          resources:
            limits:
              memory: 1Gi
              cpu: 1
          readinessProbe:
            httpGet:
              scheme: HTTPS
              path: "/login"
              port: 5601
        volumes:
        - name: certs
          secret:
            secretName: elasticsearch-config-es-http-certs-public 

```

operator error --\>

```auto
can't find private key tls.key in elastic-operator-demo3/elasticsearch-config-es-http-certs-public","errorVerbose":"can't find private key tls.key in elastic-operator-demo3/elasticsearch-config-es-http-certs-public\ngithub.com/elast

```

can anyone help on this

---

<div class="post-metadata">

**Author:** ![Bingu\_Shim](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bingu_shim/32/57949_2.png) [@Bingu\_Shim](https://discuss.elastic.co/u/Bingu_Shim)\
**Post date:** [May 22, 2020, 6:18am UTC](https://discuss.elastic.co/t/kibana-unable-to-use-elastic-http-public-cert/233805/2 "2020-05-22T06:18:17Z")

</div>

You don't need to add 'tls.certificate' section.

If you remove the 'tls.certificate' part, the elastic-operator automatically configure self-signed certificate between Kibana and Elasticsearch.

---

<div class="post-metadata">

**Author:** ![aman26ps](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aman26ps/32/82604_2.png) [@aman26ps](https://discuss.elastic.co/u/aman26ps)\
**Post date:** [May 28, 2020, 1:49pm UTC](https://discuss.elastic.co/t/kibana-unable-to-use-elastic-http-public-cert/233805/3 "2020-05-28T13:49:48Z")

</div>

Hey Bingu thanks for answering.

Let me understand you correctly , do you mean i only have to remove tls.certificate part and dont have to mount the cert volume , operator will do it automatically.

---

<div class="post-metadata">

**Author:** ![Bingu\_Shim](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bingu_shim/32/57949_2.png) [@Bingu\_Shim](https://discuss.elastic.co/u/Bingu_Shim)\
**Post date:** [May 28, 2020, 4:36pm UTC](https://discuss.elastic.co/t/kibana-unable-to-use-elastic-http-public-cert/233805/4 "2020-05-28T16:36:32Z")

</div>

Yes,

Check the following example.

> <https://github.com/elastic/cloud-on-k8s/blob/master/config/samples/kibana/kibana_es.yaml>

---

<div class="post-metadata">

**Author:** ![aman26ps](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aman26ps/32/82604_2.png) [@aman26ps](https://discuss.elastic.co/u/aman26ps)\
**Post date:** [May 28, 2020, 8:51pm UTC](https://discuss.elastic.co/t/kibana-unable-to-use-elastic-http-public-cert/233805/5 "2020-05-28T20:51:14Z")

</div>

Hey Bingu,

Still unable to resolve the issue have removed the tls.cert section from the kibana config , now facing this error

```auto
{"type":"error","@timestamp":"2020-05-28T20:45:35Z","tags":["connection","client","error"],"pid":6,"level":"error","error":{"message":"140423381055360:error:1408F09C:SSL routines:ssl3_get_record:http request:../deps/openssl/openssl/ssl/record/ssl3_record.c:322:\n","name":"Error","stack":"Error: 140423381055360:error:1408F09C:SSL routines:ssl3_get_record:http request:../deps/openssl/openssl/ssl/record/ssl3_record.c:322:\n"},"message":"140423381055360:error:1408F09C:SSL routines:ssl3_get_record:http request:../deps/openssl/openssl/ssl/record/ssl3_record.c:322:\n"}

```

i can see it has picked up the certs and all the details automatically into kibana.yaml , but still there is some issue i believe.

```auto
elasticsearch:
  hosts:
  - https://elasticsearch-config-es-http.test-demo.svc:9200
  password:<password>
  ssl:
    certificateAuthorities: /usr/share/kibana/config/elasticsearch-certs/ca.crt
    verificationMode: certificate
  username: test-demo-kibana-config-kibana-user
server:
  host: "0"
  name: kibana-config
  ssl:
    certificate: /mnt/elastic-internal/http-certs/tls.crt
    enabled: true
    key: /mnt/elastic-internal/http-certs/tls.key
xpack:
  license_management:
    ui:
      enabled: false
  monitoring:
    ui:
      container:
        elasticsearch:
          enabled: true
  security:
    encryptionKey: <key>

```

can you help me on this?

---

<div class="post-metadata">

**Author:** ![Bingu\_Shim](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bingu_shim/32/57949_2.png) [@Bingu\_Shim](https://discuss.elastic.co/u/Bingu_Shim)\
**Post date:** [May 30, 2020, 7:17am UTC](https://discuss.elastic.co/t/kibana-unable-to-use-elastic-http-public-cert/233805/6 "2020-05-30T07:17:53Z")

</div>

@aman26ps

I'm just wondering, if you have time to try the example that I shared.  
Actually, there should be no problem about https communication between Elasticsearch and Kibana managed by ECK.

If you still cannot figure out the problem. please share your eck version and k8s env and full yaml that you used.

---

<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:** [November 4, 2022, 7:59am UTC](https://discuss.elastic.co/t/kibana-unable-to-use-elastic-http-public-cert/233805/7 "2022-11-04T07:59:17Z")

</div>


