Update the "Deploy Kubernetes monitoring with Netdata" doc (#14345)
* Update kubernetes.md install and claim sections * update the links in kubernetes.md * Suggestions from code review * change "claim" to "connect" * Make the file GitHub friendly * add space * Apply suggestions from code review Co-authored-by: Chris Akritidis <43294513+cakrit@users.noreply.github.com> * fix conflicts * suggestions from review * fix uppercase --------- Co-authored-by: Chris Akritidis <43294513+cakrit@users.noreply.github.com>
Fotis Voutsas committed
Feb 8, 2023 at 15:17 UTC
e2f193f715fbc16d9734c23ac9c8d17cdaee6f55
1 file changed
+93
-84
packaging/installer/methods/kubernetes.md
+93
-84
@@ -8,105 +8,125 @@ learn_topic_type: "Tasks"
8
learn_rel_path: "Installation"
9
-->
10
11
+import Tabs from '@theme/Tabs';
12
+import TabItem from '@theme/TabItem';
13
+
14
# Deploy Kubernetes monitoring with Netdata
15
13
-This document details how to install Netdata on an existing Kubernetes (k8s) cluster. By following these directions, you
14
-will use Netdata's [Helm chart](https://github.com/netdata/helmchart) to create a Kubernetes monitoring deployment on
15
-your cluster.
16
+This document details how to install Netdata on an existing Kubernetes (k8s) cluster, and connect it to Netdata Cloud. Read our [Kubernetes visualizations](https://github.com/netdata/netdata/blob/master/docs/cloud/visualize/kubernetes.md) documentation, to see what you will get.
17
17
-The Helm chart installs one `parent` pod for storing metrics and managing alarm notifications, plus an additional
18
+The [Netdata Helm chart](https://github.com/netdata/helmchart/blob/master/charts/netdata/README.md) installs one `parent` pod for storing metrics and managing alarm notifications, plus an additional
19
`child` pod for every node in the cluster, responsible for collecting metrics from the node, Kubernetes control planes,
20
pods/containers, and [supported application-specific
21
metrics](https://github.com/netdata/helmchart#service-discovery-and-supported-services).
22
23
+### Prerequisites
24
+
25
To deploy Kubernetes monitoring with Netdata, you need:
26
24
-- A working cluster running Kubernetes v1.9 or newer.
25
-- The [kubectl](https://kubernetes.io/docs/reference/kubectl/overview/) command line tool, within [one minor version
27
+- A working cluster running Kubernetes v1.9 or newer.
28
+- The [kubectl](https://kubernetes.io/docs/reference/kubectl/overview/) command line tool, within [one minor version
29
difference](https://kubernetes.io/docs/tasks/tools/install-kubectl/#before-you-begin) of your cluster, on an
30
administrative system.
28
-- The [Helm package manager](https://helm.sh/) v3.0.0 or newer on the same administrative system.
31
+- The [Helm package manager](https://helm.sh/) v3.0.0 or newer on the same administrative system.
32
+- A Netdata Cloud account with a Space to connect the cluster to.
33
30
-## Install the Netdata Helm chart
34
+## Deploy Netdata on your Kubernetes Cluster
35
32
-We recommend you install the Helm chart using our Helm repository. In the `helm install` command, replace `netdata` with
33
-the release name of your choice.
36
+First, you need to add the Netdata helm repository, and then install Netdata.
37
+The installation process securely connects your Kubernetes cluster to stream metrics data to Netdata Cloud, enabling Kubernetes-specific visualizations like the health map and time-series composite charts.
38
35
-```bash
36
-helm repo add netdata https://netdata.github.io/helmchart/
37
-helm install netdata netdata/netdata
38
-```
39
+<Tabs groupId="installation_type">
40
+<TabItem value="new_installations" label="New Installations">
41
40
-Run `kubectl get services` and `kubectl get pods` to confirm that your cluster now runs a `netdata` service, one
41
-parent pod, and multiple child pods.
42
+<h3> Install Netdata via the <code>helm install</code> command </h3>
43
43
-You've now installed Netdata on your Kubernetes cluster. Next, it's time to opt-in and enable the powerful Kubernetes
44
-dashboards available in Netdata Cloud.
44
+#### Steps
45
46
-## Connect your Kubernetes cluster to Netdata Cloud
46
+1. Add the Netdata Helm chart repository by running:
47
48
-To start [Kubernetes monitoring](https://github.com/netdata/netdata/blob/master/docs/cloud/visualize/kubernetes.md), you must first
49
-[connect](https://github.com/netdata/netdata/blob/master/claim/README.md) your Kubernetes cluster to [Netdata Cloud](https://app.netdata.cloud). The connection process securely
50
-connects your Kubernetes cluster to stream metrics data to Netdata Cloud, enabling Kubernetes-specific visualizations
51
-like the health map and time-series composite charts.
48
+ ```bash
49
+ helm repo add netdata https://netdata.github.io/helmchart/
50
+ ```
51
53
-### New installations
52
+2. To install Netdata using the `helm install` command, run:
53
55
-First, find the script to run an `helm install` command. You can get it by clicking on your Space's dropdown, then **Manage your Space**.
56
-Click the **Nodes** tab and select the environment your node is running, in this case **kubernetes**, to reveal the script for your Space in Netdata Cloud. You need the `TOKEN`
57
-and `ROOM` values.
54
+ ```bash
55
+ helm install netdata netdata/netdata
56
+ ```
57
59
-The script should be similar to:
58
+ > :bookmark_tabs: Note
59
+ >
60
+ > If you plan to connect the node to Netdata Cloud, you can find the command with the right parameters by clicking the "Add Nodes" button in your Space's "Nodes" view.
61
61
-```bash
62
-helm install netdata netdata/netdata --set parent.claiming.enabled="true" --set parent.claiming.token="TOKEN" --set parent.claiming.rooms="ROOM" --set child.claiming.enabled=true --set child.claiming.token="TOKEN" --set child.claiming.rooms="ROOM"
63
-```
62
+ For more installation options, please read our [Netdata Helm chart for Kubernetes](https://github.com/netdata/helmchart/blob/master/charts/netdata/README.md) reference.
63
65
-### Existing installations
64
+#### Expected Result
65
67
-On an existing installation, you will need to override the configuration values by running the `helm upgrade` command and provide a file with the values to override. You can start with creating a file called `override.yml`.
66
+Run `kubectl get services` and `kubectl get pods` to confirm that your cluster now runs a `netdata` service, one parent pod, and multiple child pods.
67
69
-```bash
70
-touch override.yml
71
-```
68
+</TabItem>
69
+<TabItem value="existing_installations" label="Existing Installations">
70
73
-Paste the following into your `override.yml` file, replacing instances of `ROOM` and `TOKEN` with those from the script from Netdata Cloud. These settings connect your `parent`/`child` nodes to Netdata Cloud and store more
74
-metrics in the nodes' time-series databases.
75
-
76
-```yaml
77
-parent:
78
- claiming:
79
- enabled: true
80
- token: "TOKEN"
81
- rooms: "ROOM"
82
-
83
-child:
84
- claiming:
85
- enabled: true
86
- token: "TOKEN"
87
- rooms: "ROOM"
88
- configs:
89
- netdata:
90
- data: |
91
- [global]
92
- memory mode = ram
93
- history = 3600
94
- [health]
95
- enabled = no
96
-```
71
+<h3> Connect an existing Netdata installation to Netdata Cloud </h3>
72
98
-> ❗ These override settings, along with the Helm chart's defaults, will retain an hour's worth of metrics (`history =
99
-> 3600`, or `3600 seconds`) on each child node. Based on your metrics retention needs, and the resources available on
100
-> your cluster, you may want to increase the `history` setting.
73
+On an existing installation, in order to connect it to Netdata Cloud you will need to override the configuration values by running the `helm upgrade` command and provide a file with the values to override.
74
102
-Apply these new settings:
75
+#### Steps
76
104
-```bash
105
-helm upgrade -f override.yml netdata netdata/netdata
106
-```
77
+1. You can start with creating a file called `override.yml`
78
+
79
+ ```bash
80
+ touch override.yml
81
+ ```
82
+
83
+2. Paste the following into your `override.yml` file.
84
108
-The cluster terminates the old pods and creates new ones with the proper persistence and connection configuration. You'll
109
-see your nodes, containers, and pods appear in Netdata Cloud in a few seconds.
85
+ ```yaml
86
+ parent:
87
+ claiming:
88
+ enabled: true
89
+ token: YOUR_CLAIM_TOKEN
90
+ rooms: YOUR_ROOM_ID_A,YOUR_ROOM_ID_B
91
+
92
+ child:
93
+ claiming:
94
+ enabled: true
95
+ token: YOUR_CLAIM_TOKEN
96
+ rooms: YOUR_ROOM_ID_A,YOUR_ROOM_ID_B
97
+ configs:
98
+ netdata:
99
+ data: |
100
+ [global]
101
+ memory mode = ram
102
+ history = 3600
103
+ [health]
104
+ enabled = no
105
+ ```
106
+
107
+ > :bookmark_tabs: Note
108
+ >
109
+ > Make sure to replace `YOUR_CLAIM_TOKEN` with the claim token of your space,
110
+ > and `YOUR_ROOM_ID` with the ID of the room you are willing to connect to.
111
+
112
+ These settings connect your `parent`/`child` nodes to Netdata Cloud and store more metrics in the nodes' time-series databases.
113
+
114
+ > :bookmark_tabs: Info
115
+ >
116
+ > These override settings, along with the Helm chart's defaults, will retain an hour's worth of metrics (`history = 3600`, or `3600 seconds`) on each child node. Based on your metrics retention needs, and the resources available on your cluster, you may want to increase the `history` setting.
117
+
118
+3. To apply these new settings, run:
119
+
120
+ ```bash
121
+ helm upgrade -f override.yml netdata netdata/netdata
122
+ ```
123
+
124
+#### Expected Result
125
+
126
+The cluster terminates the old pods and creates new ones with the proper persistence and connection configuration. You'll see your nodes, containers, and pods appear in Netdata Cloud in a few seconds.
127
+
128
+</TabItem>
129
+</Tabs>
130
131

@@ -119,8 +139,7 @@ in Netdata, in addition to more guides and resources.
139
Read up on the various configuration options in the [Helm chart
140
documentation](https://github.com/netdata/helmchart#configuration) if you need to tweak your Kubernetes monitoring.
141
122
-Your first option is to create an `override.yml` file, if you haven't created one already for
123
-[connect](#connect-your-kubernetes-cluster-to-netdata-cloud), then apply the new configuration to your cluster with `helm
142
+Your first option is to create an `override.yml` file, if you haven't created one already upon [deploying](#deploy-netdata-on-your-kubernetes-cluster), then apply the new configuration to your cluster with `helm
143
upgrade`.
144
145
```bash
@@ -140,8 +159,7 @@ Netdata's [service discovery](https://github.com/netdata/agent-service-discovery
159
of the Helm chart installation, finds what services are running in a cluster's containers and automatically collects
160
service-level metrics from them.
161
143
-Service discovery supports [popular applications](https://github.com/netdata/helmchart#applications) and [Prometheus
144
-endpoints](https://github.com/netdata/helmchart#prometheus-endpoints).
162
+Service discovery supports [popular applications](https://github.com/netdata/helmchart#applications) and [Prometheus endpoints](https://github.com/netdata/helmchart#prometheus-endpoints).
163
164
If your cluster runs services on non-default ports or uses non-default names, you may need to configure service
165
discovery to start collecting metrics from your services. You have to edit the default ConfigMap that is shipped with
@@ -153,8 +171,7 @@ First, copy the default file to your administrative system.
171
curl https://raw.githubusercontent.com/netdata/helmchart/master/charts/netdata/sdconfig/child.yml -o child.yml
172
```
173
156
-Edit the new `child.yml` file according to your needs. See the [Helm chart
157
-configuration](https://github.com/netdata/helmchart#configuration) and the file itself for details.
174
+Edit the new `child.yml` file according to your needs. See the [Helm chart configuration](https://github.com/netdata/helmchart#configuration) and the file itself for details.
175
176
You can then run `helm upgrade` with the `--set-file` argument to use your configured `child.yml` file instead of the
177
default, changing the path if you copied it elsewhere.
@@ -184,18 +201,10 @@ helm upgrade netdata netdata/netdata
201
202
## What's next?
203
187
-[Start Kubernetes monitoring](https://github.com/netdata/netdata/blob/master/docs/cloud/visualize/kubernetes.md) in Netdata Cloud, which
188
-comes with meaningful visualizations out of the box.
189
-
190
-Read our guide, [_Kubernetes monitoring with Netdata: Overview and
191
-visualizations_](https://github.com/netdata/netdata/blob/master/docs/guides/monitor/kubernetes-k8s-netdata.md), for a complete walkthrough of Netdata's Kubernetes
192
-monitoring capabilities, including a health map of every container in your infrastructure, aggregated resource
193
-utilization metrics, and application metrics.
204
+[Start Kubernetes monitoring](https://github.com/netdata/netdata/blob/master/docs/cloud/visualize/kubernetes.md) in Netdata Cloud, which comes with meaningful visualizations out of the box.
205
206
### Related reference documentation
207
208
- [Netdata Cloud · Kubernetes monitoring](https://github.com/netdata/netdata/blob/master/docs/cloud/visualize/kubernetes.md)
209
- [Netdata Helm chart](https://github.com/netdata/helmchart)
210
- [Netdata service discovery](https://github.com/netdata/agent-service-discovery/)
200
-
201
-