You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update Kubernetes quickstart guide with instructions for v9.2 (elastic#3597)
This PR updates the [Quickstart: Monitor your Kubernetes cluster with
Elastic
Agent](https://www.elastic.co/docs/solutions/observability/get-started/quickstart-monitor-kubernetes-cluster-with-elastic-agent)
doc to include tje changes in the flow for the 9.2 version (using a
`helm` command instead of `kubectl` one) by adding a separate tab for
this version.
Disclaimer: we’re using simple tabs as applies switches do not support
version ranges yet.
Also reordered the tabs to start with the Serverless use case as we aim
to promote Serverless first.
Resolveselastic#2456
Copy file name to clipboardExpand all lines: solutions/observability/get-started/quickstart-monitor-kubernetes-cluster-with-elastic-agent.md
+99-23Lines changed: 99 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,13 +15,26 @@ products:
15
15
16
16
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.
17
17
18
+
:::{note}
19
+
In {{stack}} versions 9.0 and 9.1, the quickstart uses [Kubectl](https://kubernetes.io/docs/reference/kubectl/) to install {{agent}} in a Kubernetes cluster. However, these versions also support using [Helm](https://helm.sh/docs/) charts, which is now the preferred method for installing {{agent}} on Kubernetes. If your cluster is on version 9.0 or 9.1, we recommend that you follow the [Install Elastic Agent on Kubernetes using Helm](/reference/fleet/install-on-kubernetes-using-helm.md) guide to deploy {{agent}}.
20
+
:::
21
+
18
22
## Prerequisites [_prerequisites_2]
19
23
20
24
:::::{tab-set}
21
25
:group: stack-serverless
22
26
23
-
::::{tab-item} {{stack}}
24
-
:sync: stack
27
+
::::{tab-item} {{serverless-short}}
28
+
:sync: serverless
29
+
30
+
* An {{obs-serverless}} project. To learn more, refer to [Create an Observability project](/solutions/observability/get-started.md).
31
+
* 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).
32
+
* A running Kubernetes cluster with internet access
33
+
*[Helm](https://helm.sh/docs/)
34
+
::::
35
+
36
+
::::{tab-item} {{stack}} 9.2 and later
37
+
:sync: stack-9.2
25
38
26
39
* 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).
27
40
* A user with the `superuser`[built-in role](elasticsearch://reference/elasticsearch/roles.md) or the privileges required to onboard data.
@@ -33,16 +46,23 @@ In this quickstart guide, you’ll learn how to create the Kubernetes resources
33
46
:::
34
47
35
48
* A running Kubernetes cluster with internet access
* 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).
56
+
* A user with the `superuser`[built-in role](elasticsearch://reference/elasticsearch/roles.md) or the privileges required to onboard data.
* An {{obs-serverless}} project. To learn more, refer to [Create an Observability project](/solutions/observability/get-started.md).
43
-
* 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).
44
64
* A running Kubernetes cluster with internet access
@@ -61,15 +81,36 @@ The installation command provided by the UI during the quickstart cannot be used
61
81
:::::{tab-set}
62
82
:group: stack-serverless
63
83
64
-
::::{tab-item} Elastic Stack
65
-
:sync: stack
84
+
::::{tab-item} {{serverless-short}}
85
+
:sync: serverless
66
86
67
-
1.In {{kib}}, go to the **Observability** UI and click **Add Data**.
87
+
1.Go to your [{{obs-serverless}}](/solutions/observability/get-started.md) project, then go to **Add data**.
68
88
2. In the **What do you want to monitor?** section, select **Kubernetes**, and then select **Elastic Agent: Logs & Metrics**.
69
-
70
89
3. To install {{agent}} on your host, copy and run the install command.
71
90
72
-
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}}.
91
+
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.
92
+
93
+
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.
94
+
95
+
If you encounter an error during the installation, refer to [Troubleshooting](#monitor-k8s-with-agent-troubleshooting).
96
+
97
+
:::{dropdown} Details about the install command
98
+
The install command provided by the UI may be similar to:
- `elastic-agent` is the name of the specific installation of the Helm chart, known as **release name**.
107
+
- `elastic/elastic-agent` defines the name of the chart to install, using the format `<repository>/<chart-name>`.
108
+
- {{version.stack}} is the version of the {{agent}} Helm chart to be installed.
109
+
- `kube-system` is the namespace where {{agent}} is to be installed.
110
+
- `--set` parameters add configuration values specific to the serverless project, the acting user, and the deployment method of the Helm chart.
111
+
112
+
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.
113
+
:::
73
114
74
115
4. Go back to the **Kubernetes: Logs & Metrics** page in {{kib}}.
75
116
@@ -79,10 +120,10 @@ The installation command provided by the UI during the quickstart cannot be used
79
120
80
121
::::
81
122
82
-
::::{tab-item} Serverless
83
-
:sync: serverless
123
+
::::{tab-item} {{stack}} 9.2 and later
124
+
:sync: stack-9.2
84
125
85
-
1.Go to your [{{obs-serverless}}](/solutions/observability/get-started.md) project, then go to **Add Data**.
126
+
1. In {{kib}}, go to the **Observability** overview page, and click**Add Data**.
86
127
2. In the **What do you want to monitor?** section, select**Kubernetes**, and thenselect**Elastic Agent: Logs & Metrics**.
87
128
3. To install {{agent}} on your host, copy and run the install command.
88
129
@@ -118,6 +159,24 @@ The installation command provided by the UI during the quickstart cannot be used
118
159
119
160
::::
120
161
162
+
::::{tab-item} {{stack}} 9.0-9.1
163
+
:sync: stack-9.0-9.1
164
+
165
+
1. In {{kib}}, go to the **Observability** UI and click **Add Data**.
166
+
2. In the **What do you want to monitor?** section, select**Kubernetes**, and thenselect**Elastic Agent: Logs & Metrics**.
167
+
168
+
3. To install {{agent}} on your host, copy and run the install command.
169
+
170
+
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}}.
171
+
172
+
4. Go back to the **Kubernetes: Logs & Metrics** page in {{kib}}.
173
+
174
+
There might be a slight delay before data is ingested. When ready, you will see the message **We are monitoring your cluster**.
175
+
176
+
5. Click **Explore Kubernetes cluster** to navigate to dashboards and explore your data.
177
+
178
+
::::
179
+
121
180
:::::
122
181
123
182
## Visualize your data [_visualize_your_data_2]
@@ -138,17 +197,25 @@ Refer to [Observability overview](/solutions/observability/get-started/what-is-e
138
197
::::{tab-set}
139
198
:group: stack-serverless
140
199
141
-
:::{tab-item} Elastic Stack
142
-
:sync: stack
200
+
:::{tab-item} {{serverless-short}}
201
+
:sync: serverless
143
202
144
-
To uninstall {{agent}} and the Kubernetes resources installed with `kubectl`:
203
+
To uninstall {{agent}} and the Kubernetes resources installed with Helm, run:
145
204
146
-
1. Copy the `kubectl` quickstart commandforinstalling {{agent}} describedin the [Collect your data](#_collect_your_data_2) section.
147
-
2. Replace `| kubectl apply -f-` with `| kubectl delete -f-`, then run the command.
205
+
```sh
206
+
helm uninstall <release-name> -n <namespace><1>
207
+
```
208
+
1. Substitute `<release-name>` with the release name and `<namespace>` with the namespace used in the quickstart command described in the [Collect your data](#_collect_your_data_2) section.
209
+
210
+
If you used the default values from the quickstart, the command would be:
211
+
212
+
```sh
213
+
helm uninstall elastic-agent -n kube-system
214
+
```
148
215
:::
149
216
150
-
:::{tab-item} Serverless
151
-
:sync: serverless
217
+
:::{tab-item} {{stack}} 9.2 and later
218
+
:sync: stack-9.2
152
219
153
220
To uninstall {{agent}} and the Kubernetes resources installed with Helm, run:
0 commit comments