I can collect node data, but k8s can't
the configuration
- module: kubernetes
metricsets:
- node
- system
- pod
- container
- volume
period: 10s
host: ${NODE_NAME}
hosts: ["https://${NODE_IP}:10250"]
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
ssl:
verification_mode: none
certificate_authorities:
- /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
the log
2020-08-31T04:20:30.255Z INFO module/wrapper.go:259 Error fetching data for metricset kubernetes.system: error doing HTTP request to fetch 'system' Metricset data: HTTP error 401 in : 401 Unauthorized
2020-08-31T04:20:30.255Z INFO module/wrapper.go:259 Error fetching data for metricset kubernetes.volume: error doing HTTP request to fetch 'volume' Metricset data: HTTP error 401 in : 401 Unauthorized
2020-08-31T04:20:30.348Z INFO module/wrapper.go:259 Error fetching data for metricset kubernetes.container: error doing HTTP request to fetch 'container' Metricset data: HTTP error 401 in : 401 Unauthorized
2020-08-31T04:20:30.348Z INFO module/wrapper.go:259 Error fetching data for metricset kubernetes.node: error doing HTTP request to fetch 'node' Metricset data: HTTP error 401 in : 401 Unauthorized
2020-08-31T04:20:30.349Z INFO module/wrapper.go:259 Error fetching data for metricset kubernetes.pod: error doing HTTP request to fetch 'pod' Metricset data: HTTP error 401 in : 401 Unauthorized