Skip to main content

Install Netdata on Kubernetes

This document details how to install Netdata on an existing Kubernetes (k8s) cluster, and connect it to Netdata Cloud. Read our Kubernetes visualizations documentation, to see what you will get.

The Netdata Helm chart installs one parent pod for storing metrics and managing alert notifications, plus an additional child pod for every node in the cluster, responsible for collecting metrics from the node, Kubernetes control planes, pods/containers, and supported application-specific metrics.

Prerequisites

To deploy Kubernetes monitoring with Netdata, you need:

  • A working cluster running Kubernetes v1.9 or newer.
  • The kubectl command line tool, within one minor version difference of your cluster, on an administrative system.
  • The Helm package manager v3.0.0 or newer on the same administrative system.
  • A Netdata Cloud account with a Space to connect the cluster to.

Deploy Netdata on your Kubernetes Cluster

First, you need to add the Netdata helm repository, and then install Netdata.
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.

Install Netdata via the helm install command

Steps

  1. Add the Netdata Helm chart repository by running:

    helm repo add netdata https://netdata.github.io/helmchart/
  2. To install Netdata using the helm install command, run:

    helm install netdata netdata/netdata 

    Note

    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 tab.

    For more installation options, please read our Netdata Helm chart for Kubernetes reference.

Expected Result

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.

Netdata's Kubernetes monitoring
visualizations

If you don't need to configure your Netdata deployment, skip down to see how Kubernetes monitoring works in Netdata, in addition to more guides and resources.

Configure your Netdata monitoring deployment

Read up on the various configuration options in the Helm chart documentation if you need to tweak your Kubernetes monitoring.

Your first option is to create an override.yml file, if you haven't created one already upon deploying, then apply the new configuration to your cluster with helm upgrade.

helm upgrade -f override.yml netdata netdata/netdata

If you want to change only a single setting, use the --set argument with helm upgrade. For example, to change the size of the persistent metrics volume on the parent node:

helm upgrade --set parent.database.volumesize=4Gi netdata netdata/netdata

Configure service discovery

Netdata's service discovery, installed as part of the Helm chart installation, finds what services are running in a cluster's containers and automatically collects service-level metrics from them.

Service discovery supports popular applications and Prometheus endpoints.

If your cluster runs services on non-default ports or uses non-default names, you may need to configure service discovery to start collecting metrics from your services. You have to edit the default ConfigMap that is shipped with the Helmchart and deploy that to your cluster.

First, copy the default file to your administrative system.

curl https://raw.githubusercontent.com/netdata/helmchart/master/charts/netdata/sdconfig/child.yml -o child.yml

Edit the new child.yml file according to your needs. See the Helm chart configuration and the file itself for details.

You can then run helm upgrade with the --set-file argument to use your configured child.yml file instead of the default, changing the path if you copied it elsewhere.

helm upgrade --set-file sd.child.configmap.from.value=./child.yml netdata netdata/netdata

Now that you pushed an edited ConfigMap to your cluster, service discovery should find and set up metrics collection from your non-default service.

Update/reinstall the Netdata Helm chart

If you update the Helm chart's configuration, run helm upgrade to redeploy your Netdata service, replacing netdata with the name of the release, if you changed it upon installation:

helm upgrade netdata netdata/netdata

To update Netdata's Helm chart to the latest version, run helm repo update, then deploy upgrade it`:

helm repo update
helm upgrade netdata netdata/netdata

Do you have any feedback for this page? If so, you can open a new issue on our netdata/learn repository.