1. 跳过证书校验无法获取监控 如果指标抓取时,能跳过 TLS 认证是最便捷的。其 Prometheus 的 ConfigMap 配置如下: 1 2 3 4 5 6 7 8 9 - job_name: etcd metrics_path: /metrics scheme: https tls_config: insecure_skip_verify: true static_configs: - targets: [ '1.1.1.1:2379' ] - targets: [ '2.2.2.2:2379' ] - targets: [ '3.3.3.3:2379' ] 但 Prometheus Targets 报错 Get "https://3.3.3.3:2379/metrics": remote error: tls: bad certificate 在 targets 页面的报错如下图: 2. curl 验证抓取请求 跳过证书 1 2 3 curl https://1.1.1.1:2379/metrics -k curl: (35)