metrics-server: 403 Forbidden", response: "Forbidden (user=system:anonymous, verb=get, resource=nodes, subresource=stats)
Trying to run metrics-server on a 1.10.3 cluster. With the stock yaml, I’m getting this in the logs.
E0805 16:38:05.120665 1 summary.go:97] error while getting metrics summary from Kubelet xxxxxxxxxxxxxxxx(xxxxxxxxxxx:10255): Get http://xxxxxxxxxx:10255/stats/summary/: dial tcp xxxxxxxxxx:10255: getsockopt: connection refused
I found references to this error elsewhere and modified the deployment args
From: - --source=kubernetes.summary_api:‘’ To : --source=kubernetes.summary_api:https://kubernetes.default?kubeletHttps=true&kubeletPort=10250&insecure=true
That results in errors like this
E0806 19:56:05.269962 1 summary.go:97] error while getting metrics summary from Kubelet xxxxxxxxxx(xxxxxxx:10250): request failed - "403 Forbidden", response: "Forbidden (user=system:anonymous, verb=get, resource=nodes, subresource=stats)"
How do I get the stats-server working?
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 20 (3 by maintainers)
In metric-server 0.3.1 perhaps solve the problem
Can not make it work on 1.10.4 neither with the same error 😦
@aisensiy as I said, it was a network issue that the routes weren’t properly set up. The problem and solution were custom to my environment.
also, are you starting your kubelet with
--authentication-token-webhook?There are three paths for kubelet serving certs:
status.addressesfield. As long as one of the address in the Node status is used to contact the node, the certificate should have a matching SAN.