Can't connect kibana to elasticsearch though https

I have an elasticsearch cluster running on aws, ive enabled transport ssl to encrypt internode communications and the cluster is behind a load balancer that enforces ssl for external communications

I'm trying to run a local kibana container with the following configuration

elasticsearch.hosts: ["https://xxxxxx.com"]
elasticsearch.username: "kibana"
elasticsearch.password: "xxxxxxxxxxxxxxxxx"
elasticsearch.ssl.verificationMode: certificate
elasticsearch.ssl.certificateAuthorities: /usr/share/kibana/config/certificates/ca.pem

I have tested the certificate using curl as follows:

curl --cacert ca.pem -X GET "https://xxxxx.com/_cluster/health" -ukibana:xxxxxx

and i get success response from the cluster

When I start the kibana container i get the following logs, and if i try

curl localhost:5601 

I get connection reset by peer

  log   [19:53:34.089] [warning][reporting] Generating a random key for xpack.reporting.encryptionKey. To prevent pending reports from failing on restart, please set xpack.reporting.encryptionKey in kibana.yml
  log   [19:53:34.146] [info][status][plugin:reporting@7.1.1] Status changed from uninitialized to green - Ready
  log   [19:53:36.226] [info][listening] Server running at http://localhost:5601
  log   [19:53:36.524] [info][status][plugin:spaces@7.1.1] Status changed from red to green - Ready

Do you have more logs in kibana? From that list it shows that nothing is really wrong in Kibana.