Opendistro elastic and kibana in docker

Hello, I am pretty new open distro and elastic in general. I was trying to setup a local dev environment using docker.

I was managed to pull the elasticsearch and kibana image using docker.

docker pull amazon/opendistro-for-elasticsearch:1.2.0
docker pull amazon/opendistro-for-elasticsearch-kibana:1.2.0

But I am trying to figure out how to start them. As per documentation I can start the elasticsearch using below commands

docker run -p 9200:9200 -p 9600:9600 -e "discovery.type=single-node" amazon/opendistro-for-elasticsearch:1.2.0

That works fine when I fire a curl command to verify but how to check in browser
localhost:9200/ doesn’t work.

Also how to start the kibana? I didn’t find any specific command/instructions to do so.

Please assist.

Hello @Sudip7,

You are running Elasticsearch right, If you don’t find any error in the logs, can access from https://localhost:9200 (it is a secured connection, https).

For running Kibana + Elasticsearch I recommend you to do it in cluster with docker-compose:

If you don’t want to run it with docker-compose, you will need to

  • Get the IP of the Elasticsearch container:

    docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' container_name_or_id
  • Run Kibana with the ELASTIC_IP:

    docker run -p 5601:5601 -e "ELASTICSEARCH_URL=https://ELASTIC_IP" -e "ELASTICSEARCH_HOSTS=https://ELASTIC_IP:9200" amazon/opendistro-for-elasticsearch-kibana:1.2.0

Hope it helps

Hello @jjmerchante. Thanks for the reply. I tried to incorporate your suggestions.
First of all I am trying it in local machine so I don’t want the docker-compose.

when I tried https://localhost:9200

Thanks to your suggestion I was able to run the kibana.

This error is related with the self-signed certificate provided by OpenDistro, maybe your browser doesn’t allow you to accept it.

Anyway, I think that you can login as admin:admin in Kibana at http://localhost:5601 and “use Elasticsearch” from there

@Sudip7 did you find a solution for this? I am facing similar issue!