C-0004 - Resources memory limit and request

Resources memory limit and request

Framework

DevOpsBest

Description of the the issue

This control identifies all Pods for which the memory limit is not set.

Related resources

CronJob, DaemonSet, Deployment, Job, Pod, ReplicaSet, StatefulSet

What does this control test

This control identifies all Pods for which the memory limit is not set.

Remediation

Set the memory limit or use exception mechanism to avoid unnecessary notifications.

Example

apiVersion: v1
kind: Pod
metadata:
  name: frontend
spec:
  containers:
  - name: app
    image: images.my-company.example/app:v4
    resources:
      requests:
        memory: "64Mi"
        cpu: "250m"
      limits:
        memory: "128Mi"    #we make sure this is set
        cpu: "500m"


Did this page help you?