gke/ERR/2023_007

Missing request for CPU 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 CPU 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 cpu"
resource.type="k8s_cluster"
severity="WARNING"

Remediation

To add a CPU 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: