Deploying the Prometheus-based Container Cluster Monitoring Solution
- Before deploying the container solution, compile the source code and set up the Kubernetes cluster environment by referring to Installing Software by Compiling Source Code and Setting Up the Kubernetes Cluster Environment in the Containerd 1.4 Installation Guide (CentOS 8.1 and openEuler 20.03).
- The following procedure is for reference only. The specific deployment scheme depends on your service scenario.
- The Kubernetes cluster environment must be set up and have at least one subnode.
- Use ConfigMaps to manage application configurations.
kubectl apply -f prometheus-config.yml
For details, see the content of prometheus-config.yml in Deployment Files.
- Authorize access to Prometheus.
kubectl apply -f prometheus-rbac-setup.yml
For details, see the content of prometheus-rbac-setup.yml in Deployment Files.
- Use Deployment to deploy Prometheus.
kubectl apply -f prometheus-deployment.yml
For details, see the content of prometheus-deployment.yml in Deployment Files.
- Use NodeExporter to monitor cluster resource usage.
kubectl apply -f node-exporter-daemonset.yml
For details, see the content of node-exporter-daemonset.yml in Deployment Files.
- Use Blackbox Exporter to detect the Ingress and Service.
kubectl apply -f blackbox-exporter.yaml
For details, see the content of blackbox-exporter.yaml in Deployment Files.
- Check the pod status. Ensure that all pods are in the Running state.
kubectl get pods
- Check the exposed port of the service.
kubectl get svc
As shown in the following figure, the exposed port is 30900.

- Use a browser to access the Prometheus UI. The address is in the format of node_IP_address:Port_number, for example, http://192.128.255.1:30900. The node IP address can be the private network IP address of any node in the cluster.

Parent topic: Container Deployment Solution