You can support us by downloading this article as PDF from the Link below. Download the guide as PDF
install netdata on kubernetes using helm 1

Netdata is an opensource solution for monitoring and troubleshooting systems. It can be used to monitor a kubernetes cluster and display information about your cluster including node memory usage, CPU, network and many more.

Netdata dashboard gives you a broad view of your Kubernetes cluster including the services and pods running on each node.

In this post, we shall cover how to deploy Netdata on a Kubernetes cluster using Helm chart. This kind of installation deploys one parent pod on the master and child pods on each worker node.

The child pods collects metrics from the nodes they run on, kube-proxy, kubelet and cgroup metrics from the nodes.

The child nodes also use a generic prometheus collector and service discovery to deliver the metrics.

Pre-requisites

Before we can install Netdata on our cluster, you need to meet the following conditions:

  • A fully functional Kubernetes cluster, v1.9 and above.
  • Kubectl command-line tool
  • Helm package manager, version 3.0.0 and above.

Install Netdata on Kubernetes using Helm

Use the steps below to install Netdata in your Kubernetes Cluster using Helm chart.

Step 1 – Install Helm on Linux | macOS

These are the steps you’ll use to install Helm on a Linux | macOS system.

  • Download Helm package from this link
  • Extract the package using tar -xvzf <downloaded-package>
  • Move the binary file to usr/local/bin/helm

We will use installation script which automates above steps.

curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3
chmod 700 get_helm.sh
sudo ./get_helm.sh

macOS users can also use brew package management tool.

$ brew install helm

Once installed confirm by checking the current version:

$ helm version
version.BuildInfo{Version:"v3.4.0", GitCommit:"7090a89efc8a18f3d8178bf47d2462450349a004", GitTreeState:"clean", GoVersion:"go1.14.10"}
  • Add helm chart repository then update helm
$ helm repo add stable https://charts.helm.sh/stable
$ helm repo update

Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "stable" chart repository
Update Complete. ⎈Happy Helming!⎈

Step 2 – Install Netdata using Helm chart

You can install Helm chart using two methods:

  1. Install from Netdata’s Helm repository
  2. Clone Netdata Git repository.

We shall explore both methods

Install from Helm repository

Add Netdata’s Helm repository then install Helm chart

helm repo add netdata https://netdata.github.io/helmchart/
helm install netdata netdata/netdata
Clone Github repository

Make sure you have git installed to your system

Clone git repository locally

git clone https://github.com/netdata/helmchart.git netdata-helmchart

Install the chart

helm install netdata ./netdata-helmchart/charts/netdata

You can now see the helm deployments by:

$ helm list
NAME   	NAMESPACE	REVISION	UPDATED                                	STATUS  	CHART        	APP VERSION
netdata	default  	1       	2020-11-20 18:41:46.244774507 +0000 UTC	deployed	netdata-3.1.0	v1.26.0  

To check if the parent pod and the child pods have been successfully deployed:

$ kubectl get pods
NAME                              READY   STATUS    RESTARTS   AGE
netdata-child-fgh5c               2/2     Running   0          16h
netdata-child-qzhjp               2/2     Running   0          16h
netdata-child-ssmhp               2/2     Running   0          16h
netdata-parent-55d88fc784-x66ss   1/1     Running   0          16h

Step 3: Expose Netdata-parent with NodePort

In this guide, we will expose the netdata deployment using NodePort

Netdata is configured to run on port 19999 by default.

To expose the port, use the command below:

 $ kubectl expose  deployment netdata-parent --type="NodePort" --port 19999

You can now check the port that service has been exposed use the kubectl get service command:

$ kubectl get service
NAME             TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)           AGE
kubernetes       ClusterIP   10.96.0.1       <none>        443/TCP           21h
netdata          ClusterIP   10.99.202.135   <none>        19999/TCP         17h
netdata-parent   NodePort    10.97.24.181    <none>        19999:30939/TCP   16h

In our deployment, netdata-parent service has been exposed to port 30939.

You can now access the netdata dashboard in your browser by http://<yourmaster-IP>:NodePort

e.g http://172.16.1.4:30939 is the url for our dashboard.

install netdata on kubernetes using helm1 1

You can check the metrics of all the nodes which are listed on the left pane as in the screenshot below.

install netdata on kubernetes using helm2

Then you can choose any node to check the stats:

install netdata on kubernetes using helm3.png

Conclusion

We have successfully installed Netdata on our Kubernetes cluster using Helm command-line tool.

Check out some of the related articles below:

Install Kubernetes Cluster on Ubuntu with kubeadm

Install Kubernetes Cluster on CentOS 7 with kubeadm

Deploy Production Ready Kubernetes Cluster with Ansible & Kubespray

As an appreciation for the content we put out,
we would be thrilled if you support us!


As we continue to grow, we would wish to reach and impact more people who visit and take advantage of the guides we have on our blog. This is a big task for us and we are so far extremely grateful for the kind people who have shown amazing support for our work over the time we have been online.

Thank You for your support as we work to give you the best of guides and articles. Click below to buy us a coffee.

LEAVE A REPLY

Please enter your comment!
Please enter your name here