Home > front end >  CPU request on kubernetes
CPU request on kubernetes

Time:01-07

I have a resource block for my pod like -

   resources:
    limits:
      cpu: 3000m
      memory: 512Mi
    requests:
      memory: 512Mi

does it by default take request allocation for CPU (i.e 3000m) which is mentioned in resource limits (3000m). Because in my case it taking 3000m as default cpu in request even though I have not mentioned it.

CodePudding user response:

What you observed is correct, K8s will assign the requests.cpu that matches the limits.cpu when you only define the limits.cpu and not the requests.cpu. Official document here.

CodePudding user response:

sourced from kubernetes documentation

If you specify a CPU limit for a Container but do not specify a CPU request, Kubernetes automatically assigns a CPU request that matches the limit. Similarly, if a Container specifies its own memory limit, but does not specify a memory request, Kubernetes automatically assigns a memory request that matches the limit

  •  Tags:  
  • Related