12、kubernetes中的node作为监控目标
- job_name: 'kubernetes-nodes'
kubernetes_sd_configs:
- role: node
api_server: https://x.x.x.x
tls_config:
ca_file: /opt/app/k8s/admin/cert/ca/ca.pem
cert_file: /opt/app/k8s/admin/cert/apiserver-client/cert.pem
key_file: /opt/app/k8s/admin/cert/apiserver-client/key.pem
bearer_token_file: /opt/app/k8s/apiserver/cert/token.csv
scheme: https
tls_config:
ca_file: /opt/app/k8s/admin/cert/ca/ca.pem
cert_file: /opt/app/k8s/admin/cert/apiserver-client/cert.pem
key_file: /opt/app/k8s/admin/cert/apiserver-client/key.pem
./prometheus --config.file=./prometheus.k8s.yml