无法用普罗米修斯刮去Kubernetes节点

时间:2017-07-20 04:29:40

标签: kubernetes prometheus

我目前正在使用Prometheus来刮削Kubernetes组件。我只能抓住豆荚,而不是节点。我按照官方文档编写配置文件。我添加了" prometheus.io/scrape=true"节点的注释。它仍然没有用。应该有哪些其他符号。这是配置文件。

- job_name: "kubernetes-nodes"

# The URL scheme with which to fetch metrics from targets.
scheme: https

# Optional TLS configuration.
tls_config:
# Disable validation of the server certificate.
  insecure_skip_verify: true

kubernetes_sd_configs:
- api_servers:
  - https://kubernetes.default.svc
  role: node

relabel_configs:
- action: labelmap
  regex: __meta_kubernetes_node_label_(.+)
- target_label: __address__
  replacement: kubernetes.default.svc:443
- source_labels: [__meta_kubernetes_node_name]
  regex: (.+)
  target_label: __metrics_path__
  replacement: /api/v1/nodes/${1}/proxy/metrics

我浏览了prometheus日志,这是错误 -

level=error msg="Cannot initialize nodes collection: unable to list Kubernetes nodes: unable to query any API servers: Get https://kubernetes.default.svc/api/v1/nodes: x509: certificate signed by unknown authority" source="node.go:124"

我按照此示例配置文件https://github.com/prometheus/prometheus/blob/master/documentation/examples/prometheus-kubernetes.yml

0 个答案:

没有答案