☸️Specify CPU & MEMORY - Request & Limit

In Kubernetes (and computing in general), 1 vCPU means 1 virtual Central Processing Unit.

What is 1 vCPU?

  1. vCPU stands for Virtual CPU.
  2. In a virtualized environment like AWS EC2 or Kubernetes, a vCPU represents a portion of the physical CPU resources allocated to a virtual machine or container.
  3. 1 vCPU = 1 Physical CPU Core or 1 Hyperthread (in many cases, especially with Intel and AMD processors using Hyper-Threading).

In Kubernetes:

  1. Kubernetes abstracts compute resources using vCPUs.
  2. 1 vCPU in Kubernetes is equivalent to 1 CPU core on the underlying node.
  3. You can request or limit vCPU usage using resources.requests.cpu and resources.limits.cpu.

Example

resources:
requests:
cpu: "1" # Request 1 vCPU
memory: "2Gi"
limits:
cpu: "2" # Limit to 2 vCPUs
memory: "4Gi"

Key Takeaways

  1. 1 vCPU is equivalent to 1 CPU core or 1 hyperthread depending on the hardware.
  2. Kubernetes uses millicores for fractional CPU requests (e.g., 500m = 0.5 vCPU).
  3. Nodes (e.g., EC2 instances) provide the actual CPU capacity that pods consume.
  4. Efficient CPU allocation through proper requests and limits ensures stable application performance.

Popular posts from this blog

☁️ AWS Global Accelerator (GA) + Route 53

🐳 Docker Filesystem Internals (AdvancEd)

Understanding RabbitMQ Classic Mirrored Queues and Quorum Queues

🐳 Docker Tutorial for Beginners: Step-by-Step with a Simple Example

☸️What’s Inside EKS? A Beginner’s Guide to Its Core Components

☸️ Kubernetes Taints and Tolerations(with Node Affinity)

AWS Load Balancer Controller Upgrade Guide: v2.x to v3.3

🐳 Build a Tiny Flask Web App in Docker (with Ports)

☁️ Amazon S3 Explained: More Than Just Object Storage

☸️ CoreDNS and AWS VPC CNI in EKS