Skip to content

Instantly share code, notes, and snippets.

View exporter-helmchart.yaml
apiVersion: helm.cattle.io/v1
kind: HelmChart
metadata:
name: prometheus-node-exporter
namespace: kube-system
spec:
helmVersion: v3
chart: prometheus-node-exporter
targetNamespace: monitoring
repo: https://apphub.aliyuncs.com
View template-prometheus.yaml
- job_name: stage-cadvisor
honor_timestamps: true
scrape_interval: 15s
scrape_timeout: 15s
metrics_path: /metrics
scheme: https
kubernetes_sd_configs:
- api_server: https://public-ip:6443
role: node
bearer_token_file: /opt/prometheus/serviceaccount/stage/token
View monitoring-first-rbac.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: prometheus
namespace: monitoring
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: prometheus