> k get events
...
0s Warning FailedGetResourceMetric horizontalpodautoscaler/podinfo-primary missing request for cpu
0s Warning FailedComputeMetricsReplicas horizontalpodautoscaler/podinfo-primary invalid metrics (1 invalid out of 1), first error is: failed to get cpu utilization: missing request for cpu
The hpa will also show problem:
❯ k get hpa 2.6.3 ⎈ minikube/test
NAME REFERENCE TARGETS MINPODS MAXPODS REPLICAS AGE
podinfo Deployment/podinfo <unknown>/99% 2 4 0 2m29s
podinfo-primary Deployment/podinfo-primary <unknown>/99% 2 4 2 117s
The fix was to add annotation to podinfo deployment:
Due to this Linkerd issue HPA does not work with Flagger Linkerd Canary Deployments demo you will get warning events:
The hpa will also show problem:
The fix was to add annotation to podinfo deployment:
After deployment with annotation the HPA started to work...