Prometheus
Prerequisites#
Prometheus#
Prometheus is an open-source monitoring and alerting toolkit designed for reliability and scalability.
Installation#
- Create the following directory structure for Prometheus:
prometheus/ ├── helmrelease.yml ├── helmrepository.yml └── pvc.yml - Add the following content to the
helmrepository.ymlfile:--- apiVersion: source.toolkit.fluxcd.io/v1 kind: HelmRepository metadata: name: prometheus-community namespace: flux-system spec: interval: 6h url: https://prometheus-community.github.io/helm-charts - Add the following content to the
helmrelease.ymlfile:--- apiVersion: helm.toolkit.fluxcd.io/v2 kind: HelmRelease metadata: name: prometheus namespace: monitoring spec: interval: 6h chart: spec: chart: prometheus version: "28.9.1" sourceRef: kind: HelmRepository name: prometheus-community namespace: flux-system interval: 6h values: server: persistentVolume: enabled: true existingClaim: prometheus-longhorn retention: "2d" retentionSize: "4GB" - Add the following content to the
pvc.ymlfile:--- apiVersion: v1 kind: PersistentVolumeClaim metadata: name: prometheus-longhorn namespace: monitoring spec: accessModes: - ReadWriteOnce resources: requests: storage: 10Gi storageClassName: longhorn - Commit and push the changes to your git repository. Flux will deploy Prometheus to your cluster.