gke/ERR/2022_012

Missing request for memory resources.

Product: Google Kubernetes Engine
Rule class: ERR - Something that is very likely to be wrong

Description

Error means that HPA is unable to calculate the number of replicas that should be scaled up or down based on the current metrics because there is no request for memory resources specified in the deployment or pod. The HPA requires at least one metric to be specified to scale the deployment or replica set.

You can use the following filter to find matching log lines:

jsonPayload.message="missing request for memory"
resource.type="k8s_cluster"
severity="WARNING"

Remediation

To add a memory resource request to your deployment configuration, simply include a resources section in your deployment configuration file. You may follow the steps in the below guide:

Further information

If the cluster is in Autopilot cluster, you may follow the below steps to configure resource requests: