Test prometheusOperator - allanrogerr/public GitHub Wiki

Test prometheusOperator https://github.com/minio/operator/blob/master/docs/tenant_crd.adoc#pool

prometheusOperator boolean

Optional

Directs the MinIO Operator to use prometheus operator.

Tenant scrape configuration will be added to prometheus managed by the prometheus-operator.

Create a kind cluster

Deploy an operator using https://github.com/minio/operator

In the operator add under spec:

        - name: PROMETHEUS_NAMESPACE
          value: monitoring

Deploy a tenant using https://github.com/minio/operator. Adjust servers based on the kind cluster.

Add privileges

k edit clusterrole minio-operator-role

Ensure

- apiGroups:
  - monitoring.coreos.com
  resources:
  - prometheuses
  - prometheusagents
  verbs:
  - '*'

Install prometheus monitoring (https://github.com/prometheus-operator/kube-prometheus). This installs by default to the monitoring ns

kubectl apply --server-side -f manifests/setup
kubectl wait \
  --for condition=Established \
  --all CustomResourceDefinition \
  --namespace=monitoring
kubectl apply -f manifests/

Port forward Prometheus

k -n monitoring port-forward svc/prometheus-k8s 9090

Observe metrics at http://127.0.0.1:9090/query