Awesome but heavy
You need a token to connect Kibana to Elastic.
First start elastic with: docker compose up -d elastic
docker exec -it elastic-elasticsearch-1 bin/elasticsearch-service-tokens create elastic/kibana kibana-new-token
Now place the token in the kibana.yml file: elasticsearch.serviceAccountToken:xxxxxxxx
Also generate a32 char string:
xpack.security.encryptionKey: "32_CHAR_HASH"
xpack.encryptedSavedObjects.encryptionKey: "32_CHAR_HASH"
xpack.reporting.encryptionKey: "32_CHAR_HASH"
Run kibana with: docker compose up -d kibana
services:
elasticsearch:
image: elastic/elasticsearch:9.3.1
ports:
- 9200:9200
environment:
discovery.type: 'single-node'
xpack.security.enabled: 'true'
ELASTIC_PASSWORD: 'password'
ES_JAVA_OPTS: '-Xmx8g -Xms8g'
volumes:
# Gotta save the data
- esdata:/usr/share/elasticsearch/data
kibana:
image: kibana:9.3.1
volumes:
- ./kibana.yml:/usr/share/kibana/config/kibana.yml
ports:
- 5601:5601
volumes:
esdata: