Are you new to the Elastic stack or configuring a new machine and need an easy way to setup, and a single command to run Elasticsearch & Kibana? Here’s a quick Elasticsearch-Kibana setup using Docker for your dev environment.
- Install Docker for your OS.
- Pull the Docker image for Elasticsearch:
docker pull docker.elastic.co/elasticsearch/elasticsearch:7.3.0(you can change 7.3.0 to the latest or your preferred version).
- Pull the Docker image for Kibana:
docker pull docker.elastic.co/kibana/kibana:7.3.0.
The first command stops the container named
es_dev (arbitrary) if one exists and removes it. The second command starts a single-node Elasticsearch cluster inside a docker container named
es_dev, and exposes it on ports 9200 and 9300. The third and last command starts Kibana on port 5601 and links it to the container (
es_dev) where the Elasticsearch cluster is running. The last two commands are run concurrently.
You can add these three commands to a shell file (e.g elastic.sh) in order to run a single command to start Elasticsearch and Kibana i.e
chmod +x elastic.sh && ./elastic.sh the first time and
curl http://127.0.0.1:9200/_cat/health(you should have a status of green if everything went well).
- Kibana: visit http://localhost:5601 (the Kibana dashboard should load up).
Elasticsearch and Kibana can be configured using YAML. You can create config files and point to them when starting the containers.
- Elasticsearch: add
- Kibana: add