Commit 25bcafda authored by Mark Beierl's avatar Mark Beierl
Browse files

Merge branch 'palsus-master-patch-45259' into 'master'

K8s Cluster Monitoring

See merge request !75
parents 45396bb4 242ce84d
Loading
Loading
Loading
Loading
+28 −0
Original line number Diff line number Diff line
@@ -359,3 +359,31 @@ For Kubernetes clusters > 1.15 there is needed special permission of Tiller that
```bash
kubectl create clusterrolebinding tiller-cluster-admin --clusterrole=cluster-admin  --serviceaccount=kube-system:default
```

# Enabling K8s Cluster Monitoring 
After the K8s cluster is deployed using the steps mentioned above, it is also possible to monitor the workloads running in this K8s cluster using OSM. This K8s cluster is where OSM will deploy KNFs and it is the not the K8s cluster on which OSM is installed.

On the K8 cluster to be monitored Prometheus operator is installed. Once this K8s cluster information is registered in OSM. MON creates a dashboard automatically in Grafana. Grafana connects to the Prometheus opertator installed in K8s cluster to fetch the performance data of the K8s workloads. 

The following steps describes the procedure to install prometheus operator on K8s cluster and enable the monitoring.


1.	Run the following steps on K8s-cluster machine to install Prometheus operator:
	 -	Install helm
		```bash
		wget https://get.helm.sh/helm-v3.6.2-linux-amd64.tar.gz
		tar -zxvf helm-v3.6.2-linux-amd64.tar.gz
		sudo mv linux-amd64/helm /usr/local/bin/helm
		```

	-	Install prometheus-operator in monitoring namespace
		```bash
		helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
		helm repo add stable https://charts.helm.sh/stable
		helm repo update
		helm install prometheus-operator prometheus-community/kube-prometheus-stack -n monitoring --create-namespace --set prometheus.service.type="LoadBalancer"
		```
		
2.	After steps mentioned above are successful, then OSM is ready to monitor K8s cluster. Once the K8s cluster is registered against a OSM project, the corresponding dashboard will be visible in Grafana, as shown below.

    ![K8s-monitoring-dashboard](assets/800px-k8s-monitoring-grafana-dasboard.png)
+106 KiB
Loading image diff...