How to install Netdata on Kubernetes using Helm

You can download this article in PDF format via the link below to support us.
Download the guide in PDF formatturn off

Netdata is an open source solution for monitoring and troubleshooting systems. It can be used to monitor the kubernetes cluster and display information about the cluster, including node memory usage, CPU, network, etc.

The Netdata dashboard gives you a comprehensive view of the Kubernetes cluster, including the services and Pods running on each node.

In this article, we will introduce how to deploy Netdata on a Kubernetes cluster using Helm charts. This kind of installation deploys a parent Pod on the main Pod and child Pod installed on each working node.

Child Pods collect metrics from the nodes that run them, and kube-proxy, kubelet, and cgroup metrics from the nodes.

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

prerequisites

Before installing Netdata on our cluster, you need to meet the following conditions:

  • Fully functional Kubernetes cluster v1.9 and higher.
  • Kubectl command line tool
  • Helm package manager, version 3.0.0 and higher.

Install Netdata on Kubernetes using Helm

Use the following steps to install Netdata in your Kubernetes cluster through the Helm chart.

Step 1-Install Helm on Linux | Apple System

These are the steps to install Helm on Linux. macOS system.

  • Download the Helm package from here link
  • Use the following command to extract the package tar -xvzf <downloaded-package>
  • Move the binary file to usr/local/bin/helm

We will use an installation script that automates the 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 the Brew package management tool.

$ brew install helm

After the installation is complete, please check the current version to confirm:

$ helm version
version.BuildInfo{Version:"v3.4.0", GitCommit:"7090a89efc8a18f3d8178bf47d2462450349a004", GitTreeState:"clean", GoVersion:"go1.14.10"}
  • Add helmet chart repository, then update helmet
$ 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 with Helm Chart

You can install Helm charts in two ways:

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

We will explore two methods

Install from Helm repository

Add Netdata’s Helm repository, then install Helm charts

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

Clone the Github repository

Make sure you have installed git on your system

Clone the git repository locally

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

Installation chart

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

Now, you can view the helmet deployment in the following ways:

$ 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 whether the parent container and child container 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: Use NodePort to expose Netdata-parent

In this guide, we will use NodePort to expose netdata deployment

Netdata is configured to run on the port 19999 default.

To expose the port, use the following command:

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

Now you can use to check the port that the service has exposed 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, the netdata-parent service has been exposed to the port 30939.

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

E.g http://172.16.1.4:30939 Is the URL of our information center.How to install Netdata on Kubernetes using Helm

You can check the metrics of all nodes listed in the left pane as shown in the screenshot below.How to install Netdata on Kubernetes using Helm

Then, you can select any node to check statistics:How to install Netdata on Kubernetes using Helm

in conclusion

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

Check out some related articles below:

Use kubeadm to install a Kubernetes cluster on Ubuntu

Use kubeadm to install a Kubernetes cluster on CentOS 7

Deploy a production-ready Kubernetes cluster using Ansible and Kubespray

You can download this article in PDF format via the link below to support us.
Download the guide in PDF formatturn off

Sidebar