Metrics auto-scaling doesn't work showing error message "cannot unmarshal array into Go value of type v1alpha1.PodMetricsList"
Issue
While testing the auto-scaling feature of openshift 3.4., the HPA can't read the performance metrics from Heapster. Showing the following error message:
[root@ocp-test ~]# oc describe hpa/helloworld
Name: helloworld
Namespace: a10
Labels: app=helloworld
Annotations: <none>
CreationTimestamp: Mon, 06 Mar 2017 13:33:10 +0100
Reference: DeploymentConfig/helloworld
Target CPU utilization: 80%
Current CPU utilization: <unset>
Min replicas: 1
Max replicas: 5
Events:
FirstSeen LastSeen Count From SubobjectPath Type Reason Message
--------- -------- ----- ---- ------------- -------- ------ -------
33m 11s 69 {horizontal-pod-autoscaler } Warning FailedGetMetrics failed to get CPU consumption and request: failed to unmarshall heapster response: json: cannot unmarshal array into Go value of type v1alpha1.PodMetricsList
33m 11s 69 {horizontal-pod-autoscaler } Warning FailedComputeReplicas failed to get CPU utilization: failed to get CPU consumption and request: failed to unmarshall heapster response: json: cannot unmarshal array into Go value of type v1alpha1.PodMetricsList
Environment
OCP 3.4
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.