Custom Grafana Dashboard for User Workload in OpenShift
I have written a medium blog at the beginning of 2020, Grafana Dashboard in OCP4.2, where we install our own grafana to display some custom dashboards. With the formal user workload monitoring support (since OCP4.6), it’s time to re-examine the Grafana dashboard with the new monitoring stack in OCP.
Install Grafana for User Workload Monitoring
The Grafana comes with OCP is targeted for cluster monitoring and its read-only. We have to install our own Grafana for custom dashboards.
To enjoy the latest Grafana 8, let's install the Helm chart from grafana.com.
Add the helm repo,
helm repo add grafana https://grafana.github.io/helm-charts
Create the namespace,
kubectl create ns grafana
Prepare the following values.yaml
file.
ingress:
enabled: true
hosts:
- my-grafana.apps.dev-ocp48.ibmcloud.io.cpak
persistence:
type: pvc
enabled: true
Install the chart,
helm -n grafana upgrade my-grafana grafana/grafana -f values.yaml
You will notice that the Pod is pending from the replica set simply because the SCC constraint is not met, fix it by,