I have heapster installed on kubernetes, i am trying to autoscale my pods.. but i keep seeing the following:
unable to get metrics for resource cpu: unable to fetch metrics from resource metrics API: the server could not find the requested resource (get pods.metrics.k8s.io)
The heapster service itself
I1009 14:22:21.014890 1 heapster.go:73] Heapster version v1.4.2
I1009 14:22:21.015226 1 configs.go:61] Using Kubernetes client with master "https://kubernetes.default" and version v1
I1009 14:22:21.015244 1 configs.go:62] Using kubelet port 10250
I1009 14:22:21.030070 1 heapster.go:196] Starting with Metric Sink
I1009 14:22:21.042806 1 heapster.go:106] Starting heapster on port 8082
E1009 14:30:05.000311 1 kubelet.go:280] Node ip-xxxxxx.eu-west-1.compute.internal is not ready
E1009 14:30:05.000342 1 kubelet.go:280] Node ip-xxxxxx.eu-west-1.compute.internal is not ready
E1009 14:30:05.000351 1 kubelet.go:280] Node ip-xxxxxx.eu-west-1.compute.internal is not ready
E1009 14:30:05.000357 1 kubelet.go:280] Node ip-xxxxxx.eu-west-1.compute.internal is not ready
E1009 14:30:05.000363 1 kubelet.go:280] Node ip-xxxxxx.eu-west-1.compute.internal is not ready
E1009 14:30:05.000370 1 kubelet.go:280] Node ip-xxxxxx.eu-west-1.compute.internal is not ready
I want to have autoscaling working with kubernetes, anyone have any ideas?
I know heapster is deprecated, but as of now i cannot chnage or upgrade to metrics server.. so could do with some help
I have once seen similar error. The problem was RBAC issue but the error log was misleading. Make sure you have provided get
permission for pods.metrics.k8s.io
resource.
Check this similar question: Kubernetes Custom CRD: “Failed to list …: the server could not find the requested resource”
Note: Fetching metrics from Heapster is
deprecated
as of Kubernetes 1.11. Ref: Horizontal Pod Autoscaler