CPU request is not set misconfiguration detected in code
Rule Details
Cortex AppSec Rule ID
APPSEC_K8S_10
Category - Subcategory
Kubernetes - Resource Management
Provider
OTHER
Severity
LOW
Framework
Helm, Kubernetes, Kustomize, Terraform, Terraform Plan
Impact
When specifying the resource request for containers in a pod, the scheduler uses this information to decide which node to place the pod on. When setting resource limit for a container, the kubelet enforces those limits so that the running container is not allowed to use more of that resource than the limit you set. If a container is created in a namespace that has a default CPU limit, and the container does not specify its own CPU limit, then the container is assigned the default CPU limit. Kubernetes assigns a default CPU request under certain conditions.
How to Fix
Resource: Container
Arguments: resources:requests:cpu (Optional)
Defines the CPU request size for the container. [source,go]
apiVersion: v1 kind: Pod metadata: name: spec: containers:
name: image: resources: requests:
cpu:
Last updated
Was this helpful?
