Prometheus Installation with Prometheus Operator

From NovaOrdis Knowledge Base
Jump to navigation Jump to search

External

Internal

Installation

Go to https://github.com/prometheus-operator/prometheus-operator, locate the latest release (Tags → v0.42.1) and download bundle.yaml.

https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.42.1/bundle.yaml

If deploying in a namespace other than the default namespace, adjust the namespace in:

  • ClusterRoleBinding (ServiceAccount)
  • Deployment
  • ServiceAccount
  • Service
kubectl -n prometheus apply -f bundle.yaml

customresourcedefinition.apiextensions.k8s.io/alertmanagers.monitoring.coreos.com created
customresourcedefinition.apiextensions.k8s.io/podmonitors.monitoring.coreos.com created
customresourcedefinition.apiextensions.k8s.io/probes.monitoring.coreos.com created
customresourcedefinition.apiextensions.k8s.io/prometheuses.monitoring.coreos.com created
customresourcedefinition.apiextensions.k8s.io/prometheusrules.monitoring.coreos.com created
customresourcedefinition.apiextensions.k8s.io/servicemonitors.monitoring.coreos.com created
customresourcedefinition.apiextensions.k8s.io/thanosrulers.monitoring.coreos.com created
clusterrolebinding.rbac.authorization.k8s.io/prometheus-operator created
clusterrole.rbac.authorization.k8s.io/prometheus-operator created
deployment.apps/prometheus-operator created
serviceaccount/prometheus-operator created
service/prometheus-operator created

Removal