This project deploys Netdata in a distributed way. Every node of your OpenShift cluster will get a netdata slave that sends information back to the netdata-master.
First create a project with the name netdata
- Deploy the configmap for the netdata slave - This holds the basic configuration for the netdata slave
oc apply -f configmap-netdata-slave.yml
- Deploy the service for netdata - This enables the communication between the slaves and the master within the Cluster
oc apply -f service-netdata.yml
- Optional: If you with to add additional checks for netdata, this is the place to add the netdata alerts. This can also be changed at a later stage.
oc apply -f configmap-netdata-master.yml
- The netdata-slaves need to have privileges on the machines they monitor. The privileges can be added by adapting the policies.
oc adm policy add-scc-to-user privileged -n netdata -z default
- After adding the privileged security context you can deploy netdata-master
oc apply -f dc-netdata-master.yml
- Deploy the Daemonset of netdata-slaves into the cluster
oc apply -f daemonset-netdata-slave.yml
- In order to protect the Netdata Frontend with a password you can adapt the Environment variables mentioned below in
dc-nginx.ymnl
. This will automatically add Basic Auth to the nginx pod.
- name: BASIC_AUTH_USERNAME
value: netdata
- name: BASIC_AUTH_PASSWORD
value: NeverGonnaLetYouDown!
- Afer adapting the deployment config in
dc-nginx.yml
we can apply those to the project as well as the configmap with the nginx configuration.
oc apply -f dc-nginx.yml
oc apply -f configmap-nginx.yml
- Deploy the nginx service
oc apply -f service-nginx.yml
- In order to deploy netdata to all nodes in your openshift cluster you need to change the project and add an annotation
oc edit project netdata
and add following annotation
metadata:
annotations:
openshift.io/node-selector: ""
- The API Key (in
configmap-netdata-slave.yml
anddc-netdata.master.yml
) needs to be in this format:11111111-2222-3333-4444-555555555555