Files
oam/examples/kubernetes/prometheus on k8s using helm.md
2023-11-30 18:47:35 +01:00

2.3 KiB

Prometheus on Kubernetes using Helm

Table of contents

  1. Usage
  2. Further readings
  3. Sources

Usage

Installation:

helm repo add \
  'prometheus-community' 'https://prometheus-community.github.io/helm-charts'
helm upgrade --install \
  --namespace 'monitoring' --create-namespace \
  'prometheus' 'prometheus-community/prometheus'

The server can be accessed via port 80 on prometheus-server.monitoring.svc.cluster.local from within the cluster.

Get the server URL:

export POD_NAME=$(kubectl get pods --namespace monitoring -l "app=prometheus,component=server" -o jsonpath="{.items[0].metadata.name}")
kubectl --namespace monitoring port-forward $POD_NAME 9090

Alertmanager can be accessed via port 80 on prometheus-alertmanager.monitoring.svc.cluster.local from within the cluster

Get Alertmanager's URL:

export POD_NAME=$(kubectl get pods --namespace monitoring -l "app=prometheus,component=alertmanager" -o jsonpath="{.items[0].metadata.name}")
kubectl --namespace monitoring port-forward $POD_NAME 9093

PushGateway can be accessed via port 9091 on prometheus-pushgateway.monitoring.svc.cluster.local from within the cluster

Get PushGateway's URL:

export POD_NAME=$(kubectl get pods --namespace monitoring -l "app=prometheus,component=pushgateway" -o jsonpath="{.items[0].metadata.name}")

Further readings

Sources

All the references in the further readings section, plus the following: