ElasticSearch 8.1.0 and Kibana 8.1.0 on Docker
Q. Why do we need Kibana with ElasticSearch?
A. We don't. But I have found Kibana's "Dev Tools" to be very helpful in learning ElasticSearch.
Q. Why am I talking about removing security?
A. With ElasticSearch 8, security comes as default. As a developer, for every query (from postman) needs authentication headers. I don't want that. I want my developer instance to be free of clutter so that I can learn ElasticSearch. Hence I intend to remove security.
What we shall cover
- Start ElasticSearch 8.1.0 without security
- Start Kibana 8.1.0
- Connect Kibana with ElasticSearch
Start ElasticSearch 8.1.0 (without security)
docker run -d \--name elastic8 \-p 9200:9200 \-p 9300:9300 \-e "discovery.type=single-node" \-e "xpack.security.enabled=false" \elasticsearch:8.1.0
Hit http://localhost:9200/. You should see a JSON response when ElasticSearch is running successfully.
Note:
- It takes time for ElasticSearch to start
- -e "discovery.type=single-node" tells that we are not running a cluster, but a single node
- -e "xpack.security.enabled=false" tells ES that we do not want any security
Start Kibana
docker run -d \--name kibana8 \-p 5601:5601 \kibana:8.1.0
Hit http://localhost:5601/. You should see Kibana page loading
Connect Kibana with ElasticSearch
- Open http://localhost:5601/.
- You should see a page that looks like this
- We didn't use security. So we need to manually setup. Click on "Configure Manually".
- Now you should see a page that looks like this
- Here we should enter the ElasticSearch URL. Enter the URL and click "Check address"
- http://localhost:9200
- http://docker.for.mac.localhost:9200 (for Mac)
- The new page looks like
- Click on "Configure Elastic". This should open a verification box
- Fetching verification code:
- A verification code has been generated by Kibana at this moment. This is printed in logs. Open logs with command docker logs kibana8.
- In logs you should see a line at end which has verification code. The log looks like this: Your verification code is: 957 388.
- Just enter this code in box.
- Click on "Verify"
- You should see an intermediate page that looks like this. It just means that Kibana is setting up
- After some time, home page opens. And you know your Kibana and Elastic Search are connected.
Note: This guide only talks about installing ES and Kibana without security for developers to test ElasticSearch and Kibana.
Comments
Post a Comment