Hi everyone,
I’m trying to deploy a persistent Fleet Server in Docker, ensuring it runs on the same Docker network as my Elasticsearch and Kibana containers. Both Elasticsearch and Kibana are already up and running in separate containers.
My goal is to have Fleet Server properly communicate with Elasticsearch and Kibana without network or authentication issues.
Has anyone successfully set this up? Any best practices or configuration tips to keep everything stable and persistent would be greatly appreciated!
The current command I am using is:
docker run -d \
--name fleet-server-1 \
--net=elastic-start-local_default \
--privileged \
--restart unless-stopped \
-v /var/lib/elastic-agent:/usr/share/elastic-agent/data \
-e FLEET_ENROLL=1 \
-e FLEET_URL=http://localhost:8220 \
-e FLEET_ENROLLMENT_TOKEN=TOKEN HERE \
-e FLEET_SERVER_ENABLE=1 \
-e FLEET_SERVER_POLICY=fleet-server-policy \
-e FLEET_SERVER_ELASTICSEARCH_HOST=http://localhost:9200 \
-e FLEET_SERVER_PORT=8220 \
docker.elastic.co/elastic-agent/elastic-agent:9.1.4
and the error I am receiving is
/usr/local/bin/docker-entrypoint: line 18: exec: elastic-agent: not found
I have pulled the elastic-agent image a few times and it has been working for another fleet server that I created temporarily, so I am a bit confused where the issue is.
Thanks in advance!