Deploying Prometheus using Helm charts

Prometheus is a popular open source solution for event monitoring and alerting. Prometheus records real-time metrics in a time-series database, and it is one of the most popular components of Kubernetes clusters for monitoring. Almost all new managed Kubernetes solutions come with Prometheus installed in some way as part of the cluster deployment. In this recipe, you will learn how to deploy Prometheus on a Kubernetes cluster using Helm charts:

  1. Update the Helm repository. This command will fetch up-to-date charts locally from public chart repositories:
$ helm repo update
  1. Deploy Prometheus Operator in the monitoring namespace using the helm install command. This command will deploy Prometheus along with the Alertmanager, Grafana, the node-exporter and kube-state-metrics addon; basically, a bundle of the components needed to use Prometheus on a Kubernetes cluster:
$ helm install stable/prometheus-operator --name prometheus 
--namespace monitoring
  1. Verify the status of the pods deployed in the monitoring namespace:
$ kubectl get pods -n monitoring
NAME READY STATUS RESTARTS AGE
alertmanager-prometheus-prometheus-oper-alertmanager-0 2/2 Running 0 88s
prometheus-grafana-6c6f7586b6-f9jbr 2/2 Running 0 98s
prometheus-kube-state-metrics-57d6c55b56-wf4mc 1/1 Running 0 98s
prometheus-prometheus-node-exporter-8drg7 1/1 Running 0 98s
prometheus-prometheus-node-exporter-lb7l5 1/1 Running 0 98s
prometheus-prometheus-node-exporter-vx7w2 1/1 Running 0 98s
prometheus-prometheus-oper-operator-86c9c956dd-88p82 2/2 Running 0 98s
prometheus-prometheus-prometheus-oper-prometheus-0 3/3 Running 1 78s

Now you have Prometheus installed with the bundle of components required to operate it on a Kubernetes environment.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.14.142.194