- Published on
Run Kibana on Docker Swarm with Traefik
- Authors
- Name
- Ruan Bekker
- @ruanbekker
We will create a Kibana Service on Docker Swarm, that will sit behind a Traefik Reverse Proxy.
Create the Overlay Network:
$ docker network create --driver overlay appnet
Create the Traefik Service:
$ docker service create \
--name traefik \
--constraint 'node.role==manager' \
--publish 80:80 \
--publish 443:443 \
--publish 8080:8080 \
--mount type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock \
--network appnet \
traefik:camembert \
--docker --docker.swarmmode \
--docker.domain=apps.domain.com \
--docker.watch \
--logLevel=DEBUG \
--web
Set DNS:
Set a wildcard *.apps.domain.com
to resolve to apps.domain.com
, where apps.domain.com
resolves to your swarm addresses
Create Kibana:
Create a Kibana Service and set the ELASTICSEARCH_URL
to your External Elasticsearch Endpoint, take note that it uses port 9200
by default.
$ docker service create \
--name kibana \
--label 'traefik.port=5601' \
--network appnet \
--env KIBANA_ELASTICSEARCH_URL=elasticsearch.domain.com \
bitnami/kibana
Access Kibana:
Your Kibana endpoint will be available at: http://kibana.apps.domain.com
Resources:
Thank You
Thanks for reading, feel free to check out my website, feel free to subscribe to my newsletter or follow me at @ruanbekker on Twitter.
- Linktree: https://go.ruan.dev/links
- Patreon: https://go.ruan.dev/patreon
