Monitoring Scalar products on a Kubernetes cluster
This document explains how to deploy Prometheus Operator on Kubernetes with Helm. After following this document, you can use Prometheus, Alertmanager, and Grafana for monitoring Scalar products on your Kubernetes environment.
If you use a managed Kubernetes cluster and you want to use the cloud service features for monitoring and logging, please refer to the following document.
Prerequisites
- Create a Kubernetes cluster.
- Create a Bastion server and set
kubeconfig
.
Add the prometheus-community helm repository
This document uses Helm for the deployment of Prometheus Operator.
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo update
Prepare a custom values file
Please get the sample file scalar-prometheus-custom-values.yaml for kube-prometheus-stack. For the monitoring of Scalar products, this sample file's configuration is recommended.
In this sample file, the Service resources are not exposed to access from outside of a Kubernetes cluster. If you want to access dashboards from outside of your Kubernetes cluster, you must set *.service.type
to LoadBalancer
or *.ingress.enabled
to true
.
Please refer to the following official document for more details on the configurations of kube-prometheus-stack.
Deploy Prometheus Operator
Scalar products assume the Prometheus Operator is deployed in the monitoring
namespace by default. So, please create the namespace monitoring
and deploy Prometheus Operator in the monitoring
namespace.
-
Create a namespace
monitoring
on Kubernetes.kubectl create namespace monitoring
-
Deploy the kube-prometheus-stack.
helm install scalar-monitoring prometheus-community/kube-prometheus-stack -n monitoring -f scalar-prometheus-custom-values.yaml