☸️ How to install Netdata on Kubernetes using Helm

Netdata is an open source solution for monitoring and troubleshooting systems.

It can be used to monitor your Kubernetes cluster and display information about your cluster, including node memory usage, CPU, network, and more.

The Netdata dashboard will give you a broad overview of your Kubernetes cluster, including the services and pods running on each node.

In this post, we will show you how to deploy Netdata on a Kubernetes cluster using the Helm chart.

This type of installation deploys one parent module to the master and child modules to each worker node.

Child pods collect metrics from the nodes they run on, and kube-proxy, kubelet and cgroup metrics from hosts.

Child pods also use the Prometheus common collector and service discovery to deliver metrics.

Preconditions

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

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

Install Netdata on Kubernetes using Helm

Follow these steps to install Netdata on your Kubernetes cluster using the Helm chart.

Step 1 – Install Helm on Linux | macOS

Next, we’ll show you the steps you need to take to install Helm on Linux | macOS.

  • Download the Helm package from this link: https://github.com/helm/helm/releasesUnpack the package with tar -xvzf
  • Move the binary to usr / local / bin / helm

We will use an installation script that automates the steps above.

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’s package management tool.

$ brew install helm

After installation, confirm that everything is ok by checking the current version:

$ helm version
version.BuildInfo{Version:"v3.4.0", GitCommit:"7090a89efc8a18f3d8178bf47d2462450349a004", GitTreeState:"clean", GoVersion:"go1.14.10"}

Add the helm-charts 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 – Installing Netdata Using the Helm Chart

You can install Helm Chart in two ways:

  • Install from Netdata’s Helm repository
  • Clone the Netdata Git repository.

How to clone a Github repository

Make sure you have git installed on your system

Clone the git repository locally

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

Let’s install the chart:

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

Now you can see the Helm deployed:

$ 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 and 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. Open Netdata-parent with NodePort

In this tutorial, we will introduce deployment using NodePort.

Netdata is configured by default to run on port 19999.

To open the port, use the command shown below:

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

Now you can check the port on which the service was provided with 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

Note the use of the default namespace

In our deployment, the netdata-parent service was opened on port 30939.

You can now access the netdata dashboard in your browser at http: // : NodePort

for example http://172.16.1.4:30939 is the url of our toolbar.

☸️ How to install Netdata on Kubernetes using Helm

Conclusion

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

Check out some of the related articles shown below:

☸️ Learning Kubernetes: 5 Security Best Practices

☸️ How to set up Grafana on Kubernetes

☸️ How to create a user with administrator rights to access Kubernetes Dashboard

Sidebar