HPA is unable to get metrics for resource cpu after Kubernetes 1.13 upgrade #128
Comments
So at least on Vagrant/VirtualBox, I was getting the above until I inspected the metrics-server pod logs, and then found this issue: kubernetes-sigs/metrics-server#131 From this particular comment, I found that adding the explicit flags to ignore TLS errors and to use InternalIP resolution instead of the default DNS resolution seemed to fix the problem, since hostnames like So I did a quick:
And added the following command:
- /metrics-server
- --kubelet-insecure-tls
- --kubelet-preferred-address-types=InternalIP After a minute or so...
|
Testing override of the |
Pushed the above commit, which fixes things in Vagrant. Need to test it in Docker (Travis build running now), and on the Pi Cluster (doing that tomorrow). |
Travis worked, yay! |
Hmm... on the Pis themselves I'm getting:
and the metrics-server pod logs:
|
Found [this issue|https://github.com/kubernetes-sigs/metrics-server/issues/77#issuecomment-402909289]. For some reason this is necessary for the ARM container image but not the AMD64 one... Grr. Basically, edit the metrics-server deployment spec:
Change
This might not be the best long-term fix, but I'm guessing it will work the same as the AMD64 image once the ARM image is updated to work the same. I should hope, at least. |
Actually scratch that. I was still on v0.2.1 of the metrics-server-arm image. Testing on v0.3.1 now, and getting:
So I'll try using the InternalIP like I do with Vagrant now. |
Just updating the command in the template itself now:
Seems to work fine with v0.3.1. |
Fixes #128: HPA revamp and fixes for metrics-server 0.3.1 and K8s 1.13
with 0.3.1 still gives me: E0129 01:13:39.980774 1 manager.go:102] unable to fully collect metrics: [unable to fully scrape metrics from source kubelet_summary:ip-10-132-11-127.us-west-2.compute.internal: unable to fetch metrics from Kubelet ip-10-132-11-127.us-west-2.compute.internal (10.132.11.127): request failed - "401 Unauthorized", response: "Unauthorized", unable to fully scrape metrics from source kubelet_summary:ip-10-132-10-233.us-west-2.compute.internal: unable to fetch metrics from Kubelet ip-10-132-10-233.us-west-2.compute.internal (10.132.10.233): request failed - "401 Unauthorized", response: "Unauthorized", unable to fully scrape metrics from source kubelet_summary:ip-10-132-10-63.us-west-2.compute.internal: unable to fetch metrics from Kubelet ip-10-132-10-63.us-west-2.compute.internal (10.132.10.63): request failed - "401 Unauthorized", response: "Unauthorized", unable to fully scrape metrics from source kubelet_summary:ip-10-132-9-84.us-west-2.compute.internal: unable to fetch metrics from Kubelet ip-10-132-9-84.us-west-2.compute.internal (10.132.9.84): request failed - "401 Unauthorized", response: "Unauthorized", unable to fully scrape metrics from source kubelet_summary:ip-10-132-11-28.us-west-2.compute.internal: unable to fetch metrics from Kubelet ip-10-132-11-28.us-west-2.compute.internal (10.132.11.28): request failed - "401 Unauthorized", response: "Unauthorized", unable to fully scrape metrics from source kubelet_summary:ip-10-132-9-104.us-west-2.compute.internal: unable to fetch metrics from Kubelet ip-10-132-9-104.us-west-2.compute.internal (10.132.9.104): request failed - "401 Unauthorized", response: "Unauthorized"] It does seem to fix some errors though. If I try adding |
See:
And then describing it:
The text was updated successfully, but these errors were encountered: