Fetch K8s Metrics in an OpenShift Cluster

For Spark on K8S observability, Pulse provides charts and dashboards for Kubernetes namespace-level resource metrics such as CPU usage and memory usage.

  • Kubernetes metrics can be collected using different approaches, including custom integrations or open-source monitoring solutions. In OpenShift environments, a monitoring stack is available out of the box as part of the cluster setup.
  • Pulse integrates with this OpenShift monitoring stack to collect Kubernetes metrics and ingest them into its data platform, enabling visualization through charts and dashboards.
  • Pulse leverages this solution and configures it to forward Kubernetes metrics to its data platform for storage and analysis. For details, see Configuring and using the monitoring stack in OpenShift Container Platform.

Install the oc CLI for the following steps.

  1. Edit the cluster-monitoring-config config map.
Bash
Copy
  1. Put the following inside the config map.
Bash
Copy
  1. Save the changes.
  2. Now, when the next time prometheus-operator reconciles, it will pick up the new config. To make it faster, delete the Prometheus pods so they restart immediately with the updated configuration.
Bash
Copy
  1. After the pods are up, you can see the metrics flowing inside the DB.
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard