I got the command for hpa but it only for cpu metric. I want to configure hpa for cpu as well as memory metrics
I tried editing hpa file and make changes there itself but failed.
then tried this yaml file but still got error. enter image description here
I got the reason. In target section, Type must be there. it solved my error
apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: ph-prod-hpa namespace: default spec: scaleTargetRef: apiVersion: apps/v1 kind: Deployment name: ph-prod minReplicas: 1 maxReplicas: 5 metrics: