I am using docker-compose file below. I believe, I set all the necessary options for https but when I try to connect kibana over https I cant reach but I can over http. Do you have any idea,
What is wrong with my configurations.
version: '2.2'
services:
elasticsearch:
image: elastic:7.9.2
container_name: elasticsearch
environment:
- node.name=elasticsearch
- discovery.seed_hosts=elasticsearch
- cluster.initial_master_nodes=elasticsearch
- cluster.name=docker-cluster
- network.host=0.0.0.0
- "ES_JAVA_OPTS=-Xms4g -Xmx4g"
- ELASTIC_PASSWORD=1@123
- path.logs=/usr/share/elasticsearch/logs
- xpack.security.enabled=true
- xpack.security.http.ssl.keystore.path=elastic-certificates.p12
- xpack.security.http.ssl.truststore.path=elastic-certificates.p12
- xpack.security.http.ssl.client_authentication=optional
- xpack.security.transport.ssl.enabled=true
volumes:
- /home/elasticsearch/data:/usr/share/elasticsearch/data
- /home/elasticsearch/logs:/usr/share/elasticsearch/logs
- /home/elasticsearch/config/elastic-certificates.p12:/usr/share/elasticsearch/config/elastic-certificates.p12
- /home/elasticsearch/config/elastic-stack-ca.p12:/usr/share/elasticsearch/config/elastic-stack-ca.p12
user : "1000:1000"
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: "65536"
hard: "65536"
ports:
- 9200:9200
- 9300:9300
kibana:
image: kibana:7.9.2
container_name: kibana
environment:
- ELASTICSEARCH_URL="https://elasticsearch:9200"
- ELASTICSEARCH_USERNAME=elastic
- ELASTICSEARCH_PASSWORD=1@123
- server.ssl.enabled=true
- server.ssl.certificate=ca.crt
- server.ssl.key=ca.key
ports:
- 5601:5601
depends_on:
- elasticsearch
volumes:
- /home/elasticsearch/config/newfile.crt.pem:/usr/share/kibana/config/ca.crt
- /home/elasticsearch/config/newfile.key.pem:/usr/share/kibana/config/ca.key