From ee2913030290194d81ac6ef2fa0b4c3234fa286d Mon Sep 17 00:00:00 2001 From: David Kilfoyle <41695641+kilfoyle@users.noreply.github.com> Date: Wed, 18 Sep 2024 15:53:28 -0400 Subject: [PATCH] Add Fleet Server install steps on K8s and Docker (#1184) * Add Fleet Server install steps on K8s and Docker * fixup * Update docs/en/ingest-management/elastic-agent/running-on-kubernetes-managed-by-fleet.asciidoc * Update docs/en/ingest-management/elastic-agent/elastic-agent-container.asciidoc (cherry picked from commit 5cfb411151476f932149edb49397e48102bb48a0) --- .../elastic-agent-container.asciidoc | 12 ++++++++++++ ...nning-on-kubernetes-managed-by-fleet.asciidoc | 16 +++++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/docs/en/ingest-management/elastic-agent/elastic-agent-container.asciidoc b/docs/en/ingest-management/elastic-agent/elastic-agent-container.asciidoc index 4d82edf3c..4051151a9 100644 --- a/docs/en/ingest-management/elastic-agent/elastic-agent-container.asciidoc +++ b/docs/en/ingest-management/elastic-agent/elastic-agent-container.asciidoc @@ -95,6 +95,18 @@ docker run --rm docker.elastic.co/elastic-agent/elastic-agent:{version} elastic- include::{ingest-docs-root}/docs/en/ingest-management/tab-widgets/run-agent-image/widget.asciidoc[] +If you need to run {fleet-server} as well, adjust the `docker run` command above by adding these environment variables: + +[source,yaml] +---- + --env FLEET_SERVER_ENABLE=true \ <1> + --env FLEET_SERVER_ELASTICSEARCH_HOST= \ <2> + --env FLEET_SERVER_SERVICE_TOKEN= <3> +---- +<1> Set to `true` to bootstrap {fleet-server} on this {agent}. This automatically forces {fleet} enrollment as well. +<2> The Elasticsearch host for Fleet Server to communicate with, for example `http://elasticsearch:9200`. +<3> Service token to use for communication with {es} and {kib}. + [TIP] .Running {agent} on a read-only file system ==== diff --git a/docs/en/ingest-management/elastic-agent/running-on-kubernetes-managed-by-fleet.asciidoc b/docs/en/ingest-management/elastic-agent/running-on-kubernetes-managed-by-fleet.asciidoc index 312739395..a578c0438 100644 --- a/docs/en/ingest-management/elastic-agent/running-on-kubernetes-managed-by-fleet.asciidoc +++ b/docs/en/ingest-management/elastic-agent/running-on-kubernetes-managed-by-fleet.asciidoc @@ -67,8 +67,22 @@ To specify different destination/credentials, change the following parameters in <5> The basic authentication username used to connect to {kib} and retrieve a `service_token` to enable {fleet}. <6> The basic authentication password used to connect to {kib} and retrieve a `service_token` to enable {fleet}. -Refer to <> for all available options. +If you need to run {fleet-server} as well, adjust the `docker run` command above by adding these environment variables: + +[source,yaml] +------------------------------------------------ +- name: FLEET_SERVER_ENABLE + value: "true" <1> +- name: FLEET_SERVER_ELASTICSEARCH_HOST + value: "" <2> +- name: FLEET_SERVER_SERVICE_TOKEN + value: "" <3> +------------------------------------------------ +<1> Set to `true` to bootstrap {fleet-server} on this {agent}. This automatically forces {fleet} enrollment as well. +<2> The Elasticsearch host for Fleet Server to communicate with, for example `http://elasticsearch:9200`. +<3> Service token to use for communication with {es} and {kib}. +Refer to <> for all available options. [discrete] == Step 4: Configure tolerations