metrics: Scrape metrics from Kubernetes API server

Kubernetes exports a *lot* of metrics in Prometheus format.  I am not
sure what all is there, yet, but apparently several thousand time series
were added.

To allow anonymous access to the metrics, I added this RoleBinding:

```yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: prometheus
rules:
- apiGroups:
  - ""
  resources:
  - nodes/metrics
  verbs:
  - get
- nonResourceURLs:
  - /metrics
  verbs:
  - get
```
This commit is contained in:
2023-05-22 21:21:08 -05:00
parent c0bb387b18
commit 347cda74fd
4 changed files with 44 additions and 0 deletions

View File

@@ -225,3 +225,11 @@ vmagent_scrape_configs:
static_configs:
- targets:
- burp.pyrocufflink.blue:9000
- job_name: kubernetes
scheme: https
tls_config:
ca_file: /etc/victoria-metrics/kube-root-ca.crt
static_configs:
- targets:
- kubernetes.pyrocufflink.blue:6443