From f879ef34d79556027ec895af509feb1be3a9f14c Mon Sep 17 00:00:00 2001 From: Visha Angelova Date: Wed, 6 Aug 2025 16:44:56 +0200 Subject: [PATCH 1/8] Update the quickstart guide for using Elastic Agent in a Kubernetes cluster --- ...r-kubernetes-cluster-with-elastic-agent.md | 149 +++++++++++++----- 1 file changed, 111 insertions(+), 38 deletions(-) diff --git a/solutions/observability/get-started/quickstart-monitor-kubernetes-cluster-with-elastic-agent.md b/solutions/observability/get-started/quickstart-monitor-kubernetes-cluster-with-elastic-agent.md index 6d30626992..b1d2699091 100644 --- a/solutions/observability/get-started/quickstart-monitor-kubernetes-cluster-with-elastic-agent.md +++ b/solutions/observability/get-started/quickstart-monitor-kubernetes-cluster-with-elastic-agent.md @@ -13,47 +13,41 @@ products: # Quickstart: Monitor your Kubernetes cluster with {{agent}} [monitor-k8s-logs-metrics-with-elastic-agent] -In this quickstart guide, you’ll learn how to create the Kubernetes resources that are required to monitor your cluster infrastructure. - -This new approach requires minimal configuration and provides you with an easy setup to monitor your infrastructure. You no longer need to download, install, or configure the Elastic Agent, everything happens automatically when you run the kubectl command. - -The kubectl command installs the standalone Elastic Agent in your Kubernetes cluster, downloads all the Kubernetes resources needed to collect metrics from the cluster, and sends it to Elastic. +In this quickstart guide, you’ll learn how to quickly create the Kubernetes resources required to monitor your cluster infrastructure using a single command to download, install, and configure {{agent}} in your Kubernetes cluster. ## Prerequisites [_prerequisites_2] -::::{tab-set} +:::::{tab-set} :group: stack-serverless -:::{tab-item} Elastic Stack +::::{tab-item} {{stack}} :sync: stack -* An {{es}} cluster for storing and searching your data, and {{kib}} for visualizing and managing your data. This quickstart is available for all Elastic deployment models. To get started quickly, try out [{{ecloud}}](https://cloud.elastic.co/registration?page=docs&placement=docs-body). -* A user with the `superuser` [built-in role](/deploy-manage/users-roles/cluster-or-deployment-auth/built-in-roles.md) or the privileges required to onboard data. - - ::::{dropdown} Expand to view required privileges - * [**Cluster**](/deploy-manage/users-roles/cluster-or-deployment-auth/elasticsearch-privileges.md#privileges-list-cluster): `['monitor', 'manage_own_api_key']` - * [**Index**](/deploy-manage/users-roles/cluster-or-deployment-auth/elasticsearch-privileges.md#privileges-list-indices): `{ names: ['logs-*-*', 'metrics-*-*'], privileges: ['auto_configure', 'create_doc'] }` - * [**Kibana**](/deploy-manage/users-roles/cluster-or-deployment-auth/kibana-privileges.md): `{ spaces: ['*'], feature: { fleet: ['all'], fleetv2: ['all'] } }` - - :::: -* A running Kubernetes cluster. -* [Kubectl](https://kubernetes.io/docs/reference/kubectl/). +* An {{stack}} deployment or orchestrator such as [{{eck}}](/deploy-manage/deploy/cloud-on-k8s.md) with internet access. To get started quickly, try out [{{ecloud}}](https://cloud.elastic.co/registration?page=docs&placement=docs-body). +* A user with the `superuser` [built-in role](/deploy-manage/users-roles/cluster-or-deployment-auth/built-in-roles.md) or the privileges required to onboard data. +:::{dropdown} Expand to view required privileges +* [**Cluster**](/deploy-manage/users-roles/cluster-or-deployment-auth/elasticsearch-privileges.md#privileges-list-cluster): `['monitor', 'manage_own_api_key']` +* [**Index**](/deploy-manage/users-roles/cluster-or-deployment-auth/elasticsearch-privileges.md#privileges-list-indices): `{ names: ['logs-*-*', 'metrics-*-*'], privileges: ['auto_configure', 'create_doc'] }` +* [**Kibana**](/deploy-manage/users-roles/cluster-or-deployment-auth/kibana-privileges.md): `{ spaces: ['*'], feature: { fleet: ['all'], fleetv2: ['all'] } }` ::: -:::{tab-item} Serverless +* A running Kubernetes cluster with internet access +* [Kubectl](https://kubernetes.io/docs/reference/kubectl/) +:::: + +::::{tab-item} Serverless :sync: serverless * An {{obs-serverless}} project. To learn more, refer to [Create an Observability project](/solutions/observability/get-started.md). -* A user with the **Admin** role or higher—required to onboard system logs and metrics. To learn more, refer to [Assign user roles and privileges](/deploy-manage/users-roles/cloud-organization/user-roles.md#general-assign-user-roles). -* A running Kubernetes cluster. -* [Kubectl](https://kubernetes.io/docs/reference/kubectl/). - -::: - +* A user with the **Admin** role or higher (required to onboard system logs and metrics). To learn more, refer to [Assign user roles and privileges](/deploy-manage/users-roles/cloud-organization/user-roles.md#general-assign-user-roles). +* A running Kubernetes cluster with internet access +* [Helm](https://helm.sh/docs/) :::: +::::: + ## Collect your data [_collect_your_data_2] @@ -64,13 +58,13 @@ The kubectl command installs the standalone Elastic Agent in your Kubernetes clu :sync: stack 1. In {{kib}}, go to the **Observability** UI and click **Add Data**. -2. Under **What do you want to monitor?** select **Kubernetes**, and then select **Elastic Agent: Logs & Metrics**. +2. In the **What do you want to monitor?** section, select **Kubernetes**, and then select **Elastic Agent: Logs & Metrics**. -3. To install the Elastic Agent on your host, copy and run the install command. +3. To install the {{agent}} on your host, copy and run the install command. - You will use the kubectl command to download a manifest file, inject user’s API key generated by {{kib}}, and create the Kubernetes resources. + You will use the `kubectl` command to download a manifest file, inject deployment-specific data such as the API key generated by {{kib}} for the acting user, and create the Kubernetes resources for {{agent}}. -4. Go back to the **Add Observability Data** page. +4. Go back to the **Kubernetes: Logs & Metrics** page in {{kib}}. There might be a slight delay before data is ingested. When ready, you will see the message **We are monitoring your cluster**. @@ -78,18 +72,42 @@ The kubectl command installs the standalone Elastic Agent in your Kubernetes clu ::: -:::{tab-item} Serverless +::::{tab-item} Serverless :sync: serverless -1. [Create a new {{obs-serverless}} project](/solutions/observability/get-started.md), or open an existing one. -2. In your {{obs-serverless}} project, go to **Add Data**. -3. Under **What do you want to monitor?** select **Kubernetes**, and then select **Elastic Agent: Logs & Metrics**. -4. To install the Elastic Agent on your host, copy and run the install command. +1. Go to your [{{obs-serverless}}](/solutions/observability/get-started.md) project, then go to **Add Data**. +2. In the **What do you want to monitor?** section, select **Kubernetes**, and then select **Elastic Agent: Logs & Metrics**. +3. To install the {{agent}} on your host, copy and run the install command. + + You will use the Helm package manager to install and configure an instance of the {{agent}} Helm chart with additional deployment-specific data such as the API key generated by {{kib}} for the acting user. + + The Helm chart also includes a default installation of [`kube-state-metrics` (KSM)](https://github.com/kubernetes/kube-state-metrics) as it is required by the Kubernetes integration to collect cluster-level metrics. + + If you encounter an error during the installation, refer to the [Troubleshooting](#monitor-k8s-with-agent-troubleshooting) section. + + :::{dropdown} Details about the install command + The install command provided by the UI may be similar to: + + ```sh + helm repo add elastic https://helm.elastic.co/ && helm install elastic-agent elastic/elastic-agent --version 9.1.0 -n kube-system + ``` + + Where: + + - `elastic` is the name of the local Helm configuration of the Elastic Helm repository (`https://helm.elastic.co/`) + - `elastic-agent` is the name of the specific installation of the Helm chart, known as **release name** + - `elastic/elastic-agent` is the Helm chart to be installed + - `9.1.0` is the version of the {{agent}} Helm chart to be installed + - `kube-system` is the namespace where {{agent}} is installed - You will use the kubectl command to download a manifest file, inject user’s API key generated by Kibana, and create the Kubernetes resources. + The command will also include `--set` configurations specific to your deployment and user. Refer to [Install standalone Elastic Agent on Kubernetes using Helm](/reference/fleet/example-kubernetes-standalone-agent-helm.md#agent-standalone-helm-example-install) for a more detailed explanation of the configuration options used. + ::: -5. Go back to the **Add Observability Data** page. There might be a slight delay before data is ingested. When ready, you will see the message **We are monitoring your cluster**. -6. Click **Explore Kubernetes cluster** to navigate to dashboards and explore your data. +4. Go back to the **Kubernetes: Logs & Metrics** page in {{kib}}. + + There might be a slight delay before data is ingested. When ready, you will see the message **We are monitoring your cluster**. + +5. Click **Explore Kubernetes cluster** to navigate to dashboards and explore your data. ::: @@ -107,4 +125,59 @@ After installation is complete and all relevant data is flowing into Elastic, th Furthermore, you can access other useful prebuilt dashboards for monitoring Kubernetes resources, for example running pods per namespace, as well as the resources they consume, like CPU and memory. -Refer to [Observability overview](/solutions/observability/get-started/what-is-elastic-observability.md) for a description of other useful features. \ No newline at end of file +Refer to [Observability overview](/solutions/observability/get-started/what-is-elastic-observability.md) for a description of other useful features. + +## Uninstall {{agent}} from the Kubernetes cluster [monitor-k8s-with-agent-delete-agent] + +:::::{tab-set} +:group: stack-serverless + +::::{tab-item} Elastic Stack +:sync: stack + +To uninstall the {{agent}} and the Kubernetes resources installed with `kubectl`: + +1. Copy the `kubectl` quickstart command for installing {{agent}} described in the [Collect your data](#_collect_your_data_2) section. +2. Replace `| kubectl apply -f-` with `| kubectl delete -f-`, then run the command. +:::: + +::::{tab-item} Serverless +:sync: serverless + +To uninstall the {{agent}} and the Kubernetes resources installed with Helm, run: + + ```sh + helm uninstall -n <1> + ``` + 1. Substitute `` with the release name and `` with the namespace used in the quickstart command described in the [Collect your data](#_collect_your_data_2) section. + +:::{dropdown} Expand to view an example +If the {{agent}} Helm chart is installed with the `elastic-agent` release name in the `kube-system` namespace, use the following command to uninstall it: + +``` +helm uninstall elastic-agent -n kube-system +``` +::: + +:::: + +::::: + +## Troubleshooting [monitor-k8s-with-agent-troubleshooting] + +### `kube-state-metrics` is already installed + +If you're using `helm` to install {{agent}} in your Kubernetes cluster, you may encounter an error if `kube-state-metrics` is already installed in the same namespace where the {{agent}} is to be installed. In this case, add the option `--set kube-state-metrics.enabled=false` to the install command provided by the UI to skip the installation of `kube-state-metrics`. + +### The `elastic` repo already exists + +If you're using `helm` to install {{agent}} in your Kubernetes cluster and the `elastic` repository is already configured on your host, replace the `helm repo add elastic https://helm.elastic.co/ ` part of the command provided by the UI with `helm repo update elastic` to ensure the repository is updated with the latest package information. + +## Limitation [monitor-k8s-with-agent-limitation] + +The quickstart installation command provided by the UI cannot be used as-is to install {{agent}} in an air-gapped environment. For an air-gapped environment with a self-managed {{stack}} deployment or orchestrator such as [{{eck}}](/deploy-manage/deploy/cloud-on-k8s.md), refer to the following resources: + +- [Air-gapped installation of Elastic Agent](/deploy-manage/deploy/self-managed/air-gapped-install.md#air-gapped-elastic-agent) +- [Install Elastic Agent on Kubernetes using Helm](/reference/fleet/install-on-kubernetes-using-helm.md) +- [Deploy Elastic Agent in standalone mode with ECK](/deploy-manage/deploy/cloud-on-k8s/standalone-elastic-agent.md) +- [Running Elastic Agents in an air-gapped environment](/reference/fleet/air-gapped.md) \ No newline at end of file From 80b6ac086cbf2141172fb0eb15ca8fa795d2ee24 Mon Sep 17 00:00:00 2001 From: Visha Angelova Date: Wed, 6 Aug 2025 17:54:31 +0200 Subject: [PATCH 2/8] Move the Limitations section to be consistent with other docs --- ...r-kubernetes-cluster-with-elastic-agent.md | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/solutions/observability/get-started/quickstart-monitor-kubernetes-cluster-with-elastic-agent.md b/solutions/observability/get-started/quickstart-monitor-kubernetes-cluster-with-elastic-agent.md index b1d2699091..59c0bb7937 100644 --- a/solutions/observability/get-started/quickstart-monitor-kubernetes-cluster-with-elastic-agent.md +++ b/solutions/observability/get-started/quickstart-monitor-kubernetes-cluster-with-elastic-agent.md @@ -48,6 +48,14 @@ In this quickstart guide, you’ll learn how to quickly create the Kubernetes re ::::: +## Limitations [monitor-k8s-with-agent-limitations] + +The installation command provided by the UI during the quickstart cannot be used as-is to install {{agent}} in an air-gapped environment. For an air-gapped environment with a self-managed {{stack}} deployment or orchestrator such as [{{eck}}](/deploy-manage/deploy/cloud-on-k8s.md), refer to the following resources: + +- [Air-gapped installation of Elastic Agent](/deploy-manage/deploy/self-managed/air-gapped-install.md#air-gapped-elastic-agent) +- [Install Elastic Agent on Kubernetes using Helm](/reference/fleet/install-on-kubernetes-using-helm.md) +- [Deploy Elastic Agent in standalone mode with ECK](/deploy-manage/deploy/cloud-on-k8s/standalone-elastic-agent.md) +- [Running Elastic Agents in an air-gapped environment](/reference/fleet/air-gapped.md) ## Collect your data [_collect_your_data_2] @@ -113,7 +121,6 @@ In this quickstart guide, you’ll learn how to quickly create the Kubernetes re :::: - ## Visualize your data [_visualize_your_data_2] After installation is complete and all relevant data is flowing into Elastic, the **Visualize your data** section allows you to access the Kubernetes Cluster Overview dashboard that can be used to monitor the health of the cluster. @@ -171,13 +178,4 @@ If you're using `helm` to install {{agent}} in your Kubernetes cluster, you may ### The `elastic` repo already exists -If you're using `helm` to install {{agent}} in your Kubernetes cluster and the `elastic` repository is already configured on your host, replace the `helm repo add elastic https://helm.elastic.co/ ` part of the command provided by the UI with `helm repo update elastic` to ensure the repository is updated with the latest package information. - -## Limitation [monitor-k8s-with-agent-limitation] - -The quickstart installation command provided by the UI cannot be used as-is to install {{agent}} in an air-gapped environment. For an air-gapped environment with a self-managed {{stack}} deployment or orchestrator such as [{{eck}}](/deploy-manage/deploy/cloud-on-k8s.md), refer to the following resources: - -- [Air-gapped installation of Elastic Agent](/deploy-manage/deploy/self-managed/air-gapped-install.md#air-gapped-elastic-agent) -- [Install Elastic Agent on Kubernetes using Helm](/reference/fleet/install-on-kubernetes-using-helm.md) -- [Deploy Elastic Agent in standalone mode with ECK](/deploy-manage/deploy/cloud-on-k8s/standalone-elastic-agent.md) -- [Running Elastic Agents in an air-gapped environment](/reference/fleet/air-gapped.md) \ No newline at end of file +If you're using `helm` to install {{agent}} in your Kubernetes cluster and the `elastic` repository is already configured on your host, replace the `helm repo add elastic https://helm.elastic.co/ ` part of the command provided by the UI with `helm repo update elastic` to ensure the repository is updated with the latest package information. \ No newline at end of file From 568c7c2c59d8580705a27c229628eeba680a882a Mon Sep 17 00:00:00 2001 From: Visha Angelova Date: Thu, 7 Aug 2025 14:31:12 +0200 Subject: [PATCH 3/8] Apply review suggestions --- ...r-kubernetes-cluster-with-elastic-agent.md | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/solutions/observability/get-started/quickstart-monitor-kubernetes-cluster-with-elastic-agent.md b/solutions/observability/get-started/quickstart-monitor-kubernetes-cluster-with-elastic-agent.md index 59c0bb7937..f61f6076c4 100644 --- a/solutions/observability/get-started/quickstart-monitor-kubernetes-cluster-with-elastic-agent.md +++ b/solutions/observability/get-started/quickstart-monitor-kubernetes-cluster-with-elastic-agent.md @@ -13,7 +13,7 @@ products: # Quickstart: Monitor your Kubernetes cluster with {{agent}} [monitor-k8s-logs-metrics-with-elastic-agent] -In this quickstart guide, you’ll learn how to quickly create the Kubernetes resources required to monitor your cluster infrastructure using a single command to download, install, and configure {{agent}} in your Kubernetes cluster. +In this quickstart guide, you’ll learn how to quickly create the Kubernetes resources required to monitor your cluster infrastructure by using a single command to download, install, and configure {{agent}} in your Kubernetes cluster. ## Prerequisites [_prerequisites_2] @@ -52,10 +52,10 @@ In this quickstart guide, you’ll learn how to quickly create the Kubernetes re The installation command provided by the UI during the quickstart cannot be used as-is to install {{agent}} in an air-gapped environment. For an air-gapped environment with a self-managed {{stack}} deployment or orchestrator such as [{{eck}}](/deploy-manage/deploy/cloud-on-k8s.md), refer to the following resources: -- [Air-gapped installation of Elastic Agent](/deploy-manage/deploy/self-managed/air-gapped-install.md#air-gapped-elastic-agent) +- [Install Elastic Agent air-gapped](/deploy-manage/deploy/self-managed/air-gapped-install.md#air-gapped-elastic-agent) - [Install Elastic Agent on Kubernetes using Helm](/reference/fleet/install-on-kubernetes-using-helm.md) - [Deploy Elastic Agent in standalone mode with ECK](/deploy-manage/deploy/cloud-on-k8s/standalone-elastic-agent.md) -- [Running Elastic Agents in an air-gapped environment](/reference/fleet/air-gapped.md) +- [Run Elastic Agent in an air-gapped environment](/reference/fleet/air-gapped.md) ## Collect your data [_collect_your_data_2] @@ -68,9 +68,9 @@ The installation command provided by the UI during the quickstart cannot be used 1. In {{kib}}, go to the **Observability** UI and click **Add Data**. 2. In the **What do you want to monitor?** section, select **Kubernetes**, and then select **Elastic Agent: Logs & Metrics**. -3. To install the {{agent}} on your host, copy and run the install command. +3. To install {{agent}} on your host, copy and run the install command. - You will use the `kubectl` command to download a manifest file, inject deployment-specific data such as the API key generated by {{kib}} for the acting user, and create the Kubernetes resources for {{agent}}. + By running this command, you use `kubectl kustomize` to download a manifest file, inject deployment-specific data such as the API key generated by {{kib}} for the acting user, and create the Kubernetes resources for {{agent}}. 4. Go back to the **Kubernetes: Logs & Metrics** page in {{kib}}. @@ -85,13 +85,13 @@ The installation command provided by the UI during the quickstart cannot be used 1. Go to your [{{obs-serverless}}](/solutions/observability/get-started.md) project, then go to **Add Data**. 2. In the **What do you want to monitor?** section, select **Kubernetes**, and then select **Elastic Agent: Logs & Metrics**. -3. To install the {{agent}} on your host, copy and run the install command. +3. To install {{agent}} on your host, copy and run the install command. - You will use the Helm package manager to install and configure an instance of the {{agent}} Helm chart with additional deployment-specific data such as the API key generated by {{kib}} for the acting user. + By running this command, you use the Helm package manager to install and configure an instance of the {{agent}} Helm chart with additional deployment-specific data such as the API key generated by {{kib}} for the acting user. - The Helm chart also includes a default installation of [`kube-state-metrics` (KSM)](https://github.com/kubernetes/kube-state-metrics) as it is required by the Kubernetes integration to collect cluster-level metrics. + The Helm chart also includes a default installation of [`kube-state-metrics` (KSM)](https://github.com/kubernetes/kube-state-metrics), which is required by the Kubernetes integration to collect cluster-level metrics. - If you encounter an error during the installation, refer to the [Troubleshooting](#monitor-k8s-with-agent-troubleshooting) section. + If you encounter an error during the installation, refer to [Troubleshooting](#monitor-k8s-with-agent-troubleshooting). :::{dropdown} Details about the install command The install command provided by the UI may be similar to: @@ -102,11 +102,11 @@ The installation command provided by the UI during the quickstart cannot be used Where: - - `elastic` is the name of the local Helm configuration of the Elastic Helm repository (`https://helm.elastic.co/`) - - `elastic-agent` is the name of the specific installation of the Helm chart, known as **release name** - - `elastic/elastic-agent` is the Helm chart to be installed - - `9.1.0` is the version of the {{agent}} Helm chart to be installed - - `kube-system` is the namespace where {{agent}} is installed + - `elastic` is the name of the local Helm configuration of the Elastic Helm repository (`https://helm.elastic.co/`). + - `elastic-agent` is the name of the specific installation of the Helm chart, known as **release name**. + - `elastic/elastic-agent` is the Helm chart to be installed. + - `9.1.0` is the version of the {{agent}} Helm chart to be installed. + - `kube-system` is the namespace where {{agent}} is installed. The command will also include `--set` configurations specific to your deployment and user. Refer to [Install standalone Elastic Agent on Kubernetes using Helm](/reference/fleet/example-kubernetes-standalone-agent-helm.md#agent-standalone-helm-example-install) for a more detailed explanation of the configuration options used. ::: @@ -142,7 +142,7 @@ Refer to [Observability overview](/solutions/observability/get-started/what-is-e ::::{tab-item} Elastic Stack :sync: stack -To uninstall the {{agent}} and the Kubernetes resources installed with `kubectl`: +To uninstall {{agent}} and the Kubernetes resources installed with `kubectl`: 1. Copy the `kubectl` quickstart command for installing {{agent}} described in the [Collect your data](#_collect_your_data_2) section. 2. Replace `| kubectl apply -f-` with `| kubectl delete -f-`, then run the command. @@ -151,7 +151,7 @@ To uninstall the {{agent}} and the Kubernetes resources installed with `kubectl` ::::{tab-item} Serverless :sync: serverless -To uninstall the {{agent}} and the Kubernetes resources installed with Helm, run: +To uninstall {{agent}} and the Kubernetes resources installed with Helm, run: ```sh helm uninstall -n <1> @@ -174,7 +174,7 @@ helm uninstall elastic-agent -n kube-system ### `kube-state-metrics` is already installed -If you're using `helm` to install {{agent}} in your Kubernetes cluster, you may encounter an error if `kube-state-metrics` is already installed in the same namespace where the {{agent}} is to be installed. In this case, add the option `--set kube-state-metrics.enabled=false` to the install command provided by the UI to skip the installation of `kube-state-metrics`. +If you're using `helm` to install {{agent}} in your Kubernetes cluster, you may encounter an error if `kube-state-metrics` is already installed in the same namespace where {{agent}} is to be installed. In this case, add the option `--set kube-state-metrics.enabled=false` to the install command provided by the UI to skip the installation of `kube-state-metrics`. ### The `elastic` repo already exists From 14bb4c5f3df2704142a776ee980a14555232a181 Mon Sep 17 00:00:00 2001 From: Visha Angelova Date: Fri, 8 Aug 2025 11:53:47 +0200 Subject: [PATCH 4/8] Fixes based on review suggestions --- ...r-kubernetes-cluster-with-elastic-agent.md | 39 +++++++++---------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/solutions/observability/get-started/quickstart-monitor-kubernetes-cluster-with-elastic-agent.md b/solutions/observability/get-started/quickstart-monitor-kubernetes-cluster-with-elastic-agent.md index f61f6076c4..770c0411c3 100644 --- a/solutions/observability/get-started/quickstart-monitor-kubernetes-cluster-with-elastic-agent.md +++ b/solutions/observability/get-started/quickstart-monitor-kubernetes-cluster-with-elastic-agent.md @@ -24,7 +24,7 @@ In this quickstart guide, you’ll learn how to quickly create the Kubernetes re :sync: stack -* An {{stack}} deployment or orchestrator such as [{{eck}}](/deploy-manage/deploy/cloud-on-k8s.md) with internet access. To get started quickly, try out [{{ecloud}}](https://cloud.elastic.co/registration?page=docs&placement=docs-body). +* A running {{stack}} deployment, either self-managed or orchestrated by platforms like {{ech}}, {{ece}}, or {{eck}}, with internet access. To get started quickly, try out [{{ecloud}}](https://cloud.elastic.co/registration?page=docs&placement=docs-body). * A user with the `superuser` [built-in role](/deploy-manage/users-roles/cluster-or-deployment-auth/built-in-roles.md) or the privileges required to onboard data. :::{dropdown} Expand to view required privileges @@ -96,19 +96,19 @@ The installation command provided by the UI during the quickstart cannot be used :::{dropdown} Details about the install command The install command provided by the UI may be similar to: - ```sh - helm repo add elastic https://helm.elastic.co/ && helm install elastic-agent elastic/elastic-agent --version 9.1.0 -n kube-system + ```sh subs=true + helm repo add elastic https://helm.elastic.co/ && helm install elastic-agent elastic/elastic-agent --version {{version.stack}} -n kube-system --set outputs.default.url=https::443 --set kubernetes.onboardingID= --set kubernetes.enabled=true --set outputs.default.type=ESPlainAuthAPI --set outputs.default.api_key=$(echo "" | base64 -d) ``` Where: - - `elastic` is the name of the local Helm configuration of the Elastic Helm repository (`https://helm.elastic.co/`). - `elastic-agent` is the name of the specific installation of the Helm chart, known as **release name**. - - `elastic/elastic-agent` is the Helm chart to be installed. - - `9.1.0` is the version of the {{agent}} Helm chart to be installed. - - `kube-system` is the namespace where {{agent}} is installed. - - The command will also include `--set` configurations specific to your deployment and user. Refer to [Install standalone Elastic Agent on Kubernetes using Helm](/reference/fleet/example-kubernetes-standalone-agent-helm.md#agent-standalone-helm-example-install) for a more detailed explanation of the configuration options used. + - `elastic/elastic-agent` defines the name of the Helm repository, where `elastic` corresponds to `https://helm.elastic.co/` and `elastic-agent` is the name of the Helm chart + - {{version.stack}} is the version of the {{agent}} Helm chart to be installed. + - `kube-system` is the namespace where {{agent}} is to be installed. + - `--set` adds configuration options with parameters specific to the serverless project, the acting user, and the installation method of the Helm chart. + + Refer to [Install standalone Elastic Agent on Kubernetes using Helm](/reference/fleet/example-kubernetes-standalone-agent-helm.md#agent-standalone-helm-example-install) for a more detailed explanation of the configuration options used. ::: 4. Go back to the **Kubernetes: Logs & Metrics** page in {{kib}}. @@ -136,19 +136,19 @@ Refer to [Observability overview](/solutions/observability/get-started/what-is-e ## Uninstall {{agent}} from the Kubernetes cluster [monitor-k8s-with-agent-delete-agent] -:::::{tab-set} +::::{tab-set} :group: stack-serverless -::::{tab-item} Elastic Stack +:::{tab-item} Elastic Stack :sync: stack To uninstall {{agent}} and the Kubernetes resources installed with `kubectl`: 1. Copy the `kubectl` quickstart command for installing {{agent}} described in the [Collect your data](#_collect_your_data_2) section. 2. Replace `| kubectl apply -f-` with `| kubectl delete -f-`, then run the command. -:::: +::: -::::{tab-item} Serverless +:::{tab-item} Serverless :sync: serverless To uninstall {{agent}} and the Kubernetes resources installed with Helm, run: @@ -158,24 +158,21 @@ To uninstall {{agent}} and the Kubernetes resources installed with Helm, run: ``` 1. Substitute `` with the release name and `` with the namespace used in the quickstart command described in the [Collect your data](#_collect_your_data_2) section. -:::{dropdown} Expand to view an example -If the {{agent}} Helm chart is installed with the `elastic-agent` release name in the `kube-system` namespace, use the following command to uninstall it: + If you used the default values from the quickstart, the command would be: -``` -helm uninstall elastic-agent -n kube-system -``` + ```sh + helm uninstall elastic-agent -n kube-system + ``` ::: :::: -::::: - ## Troubleshooting [monitor-k8s-with-agent-troubleshooting] ### `kube-state-metrics` is already installed If you're using `helm` to install {{agent}} in your Kubernetes cluster, you may encounter an error if `kube-state-metrics` is already installed in the same namespace where {{agent}} is to be installed. In this case, add the option `--set kube-state-metrics.enabled=false` to the install command provided by the UI to skip the installation of `kube-state-metrics`. -### The `elastic` repo already exists +### The `elastic` repository already exists If you're using `helm` to install {{agent}} in your Kubernetes cluster and the `elastic` repository is already configured on your host, replace the `helm repo add elastic https://helm.elastic.co/ ` part of the command provided by the UI with `helm repo update elastic` to ensure the repository is updated with the latest package information. \ No newline at end of file From b2cddf1f5385c6fbcea6dfef7cd1760a52736097 Mon Sep 17 00:00:00 2001 From: Visha Angelova Date: Fri, 8 Aug 2025 12:00:33 +0200 Subject: [PATCH 5/8] Fix indentation of tab content --- ...itor-kubernetes-cluster-with-elastic-agent.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/solutions/observability/get-started/quickstart-monitor-kubernetes-cluster-with-elastic-agent.md b/solutions/observability/get-started/quickstart-monitor-kubernetes-cluster-with-elastic-agent.md index 770c0411c3..eb49383b43 100644 --- a/solutions/observability/get-started/quickstart-monitor-kubernetes-cluster-with-elastic-agent.md +++ b/solutions/observability/get-started/quickstart-monitor-kubernetes-cluster-with-elastic-agent.md @@ -153,16 +153,16 @@ To uninstall {{agent}} and the Kubernetes resources installed with `kubectl`: To uninstall {{agent}} and the Kubernetes resources installed with Helm, run: - ```sh - helm uninstall -n <1> - ``` - 1. Substitute `` with the release name and `` with the namespace used in the quickstart command described in the [Collect your data](#_collect_your_data_2) section. +```sh +helm uninstall -n <1> +``` +1. Substitute `` with the release name and `` with the namespace used in the quickstart command described in the [Collect your data](#_collect_your_data_2) section. - If you used the default values from the quickstart, the command would be: +If you used the default values from the quickstart, the command would be: - ```sh - helm uninstall elastic-agent -n kube-system - ``` +```sh +helm uninstall elastic-agent -n kube-system +``` ::: :::: From 0a4540d5f0523ab027bde7b9ac2dd422af9dc2c3 Mon Sep 17 00:00:00 2001 From: Visha Angelova <91186315+vishaangelova@users.noreply.github.com> Date: Fri, 8 Aug 2025 13:00:34 +0200 Subject: [PATCH 6/8] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Edu González de la Herrán <25320357+eedugon@users.noreply.github.com> --- ...uickstart-monitor-kubernetes-cluster-with-elastic-agent.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/solutions/observability/get-started/quickstart-monitor-kubernetes-cluster-with-elastic-agent.md b/solutions/observability/get-started/quickstart-monitor-kubernetes-cluster-with-elastic-agent.md index eb49383b43..e6c0ced913 100644 --- a/solutions/observability/get-started/quickstart-monitor-kubernetes-cluster-with-elastic-agent.md +++ b/solutions/observability/get-started/quickstart-monitor-kubernetes-cluster-with-elastic-agent.md @@ -103,10 +103,10 @@ The installation command provided by the UI during the quickstart cannot be used Where: - `elastic-agent` is the name of the specific installation of the Helm chart, known as **release name**. - - `elastic/elastic-agent` defines the name of the Helm repository, where `elastic` corresponds to `https://helm.elastic.co/` and `elastic-agent` is the name of the Helm chart + - `elastic/elastic-agent` defines the name of the chart to install, using the format `/`. - {{version.stack}} is the version of the {{agent}} Helm chart to be installed. - `kube-system` is the namespace where {{agent}} is to be installed. - - `--set` adds configuration options with parameters specific to the serverless project, the acting user, and the installation method of the Helm chart. + - `--set` parameters add configuration values specific to the serverless project, the acting user, and the deployment method of the Helm chart. Refer to [Install standalone Elastic Agent on Kubernetes using Helm](/reference/fleet/example-kubernetes-standalone-agent-helm.md#agent-standalone-helm-example-install) for a more detailed explanation of the configuration options used. ::: From 21ad86bc6f51e3dc0d68834b2642244c07964aee Mon Sep 17 00:00:00 2001 From: Visha Angelova Date: Fri, 8 Aug 2025 13:20:34 +0200 Subject: [PATCH 7/8] Fix tab formatting --- ...t-monitor-kubernetes-cluster-with-elastic-agent.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/solutions/observability/get-started/quickstart-monitor-kubernetes-cluster-with-elastic-agent.md b/solutions/observability/get-started/quickstart-monitor-kubernetes-cluster-with-elastic-agent.md index e6c0ced913..6cfaf51d3c 100644 --- a/solutions/observability/get-started/quickstart-monitor-kubernetes-cluster-with-elastic-agent.md +++ b/solutions/observability/get-started/quickstart-monitor-kubernetes-cluster-with-elastic-agent.md @@ -23,7 +23,6 @@ In this quickstart guide, you’ll learn how to quickly create the Kubernetes re ::::{tab-item} {{stack}} :sync: stack - * A running {{stack}} deployment, either self-managed or orchestrated by platforms like {{ech}}, {{ece}}, or {{eck}}, with internet access. To get started quickly, try out [{{ecloud}}](https://cloud.elastic.co/registration?page=docs&placement=docs-body). * A user with the `superuser` [built-in role](/deploy-manage/users-roles/cluster-or-deployment-auth/built-in-roles.md) or the privileges required to onboard data. @@ -59,10 +58,10 @@ The installation command provided by the UI during the quickstart cannot be used ## Collect your data [_collect_your_data_2] -::::{tab-set} +:::::{tab-set} :group: stack-serverless -:::{tab-item} Elastic Stack +::::{tab-item} Elastic Stack :sync: stack 1. In {{kib}}, go to the **Observability** UI and click **Add Data**. @@ -78,7 +77,7 @@ The installation command provided by the UI during the quickstart cannot be used 5. Click **Explore Kubernetes cluster** to navigate to dashboards and explore your data. -::: +:::: ::::{tab-item} Serverless :sync: serverless @@ -117,10 +116,10 @@ The installation command provided by the UI during the quickstart cannot be used 5. Click **Explore Kubernetes cluster** to navigate to dashboards and explore your data. -::: - :::: +::::: + ## Visualize your data [_visualize_your_data_2] After installation is complete and all relevant data is flowing into Elastic, the **Visualize your data** section allows you to access the Kubernetes Cluster Overview dashboard that can be used to monitor the health of the cluster. From 6b0120ed423f1cb48aeda6a407126f7e81033d61 Mon Sep 17 00:00:00 2001 From: Visha Angelova <91186315+vishaangelova@users.noreply.github.com> Date: Mon, 11 Aug 2025 09:21:03 +0200 Subject: [PATCH 8/8] Apply suggestions from code review Co-authored-by: Benjamin Ironside Goldstein <91905639+benironside@users.noreply.github.com> --- .../quickstart-monitor-kubernetes-cluster-with-elastic-agent.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solutions/observability/get-started/quickstart-monitor-kubernetes-cluster-with-elastic-agent.md b/solutions/observability/get-started/quickstart-monitor-kubernetes-cluster-with-elastic-agent.md index 6cfaf51d3c..2c7059c78d 100644 --- a/solutions/observability/get-started/quickstart-monitor-kubernetes-cluster-with-elastic-agent.md +++ b/solutions/observability/get-started/quickstart-monitor-kubernetes-cluster-with-elastic-agent.md @@ -13,7 +13,7 @@ products: # Quickstart: Monitor your Kubernetes cluster with {{agent}} [monitor-k8s-logs-metrics-with-elastic-agent] -In this quickstart guide, you’ll learn how to quickly create the Kubernetes resources required to monitor your cluster infrastructure by using a single command to download, install, and configure {{agent}} in your Kubernetes cluster. +In this quickstart guide, you’ll learn how to create the Kubernetes resources required to monitor your cluster infrastructure by using a single command to download, install, and configure {{agent}} in your Kubernetes cluster. ## Prerequisites [_prerequisites_2]