Resource Types
In kubernetes, the resources are quantified and allocated in ensuring the efficient usage and fair distribution among the pods and containers. It primary resources types are CPU and Memory, where each comes up with specific units for measurement and allocation.
CPU Resource Units
- The CPU resources are measured in units of cores where 1 CPU equals to one physical core or one virtual core in a vCPU. ie.,
1 CPU = 1000mCPU
- The minimum guarantee and maximum allowed CPU resources can be defined while creating the pods through the Yaml code.
- The following is the example of defining the CPU resource usage with setting maximum and minimum limits:
resources:
requests:
cpu: "500m" # 0.5 CPU
limits:
cpu: "1" # 1 CPU
Memory Resource Units
- The Memory Resources are measured in the units of bytes. The common units of this scale is Mi (Mebibytes), Gi (Gibibytes).
- The minimum guarantee and maximum allowed Memory resources can be defined while creating the pods through the Yaml code.
- The following is the example of defining the Memory resource usage with setting maximum and minimum limits:
resources:
requests:
memory: "256Mi"
limits:
memory: "512Mi"
How to Opimize kubernetes Pod CPU And Memory Utilization?
Before we dive into boosting your Kubernetes pod performance, let’s take a moment to understand the key players in this orchestration symphony. In the world of Kubernetes, pods are used to run containers, which are the smallest units of computing in Kubernetes.
Table of Content
- Why to optimize Kubernetes Pod CPU and Memory Utilization?
- How to check Kubernetes Pod CPU and Memory Utilization? A Step-By-Step Guide
- Resource Management for Pods and Containers
- Resource Types
- Container Resources Examples
- How Pods with resource Requests are Scheduled?
- How to Create a job in Kubernetes?
- Cron Job Benefits in Kubernetes
- Why does resource consumption increase while a pod is not running state?
- Conclusion
- Kubernetes Pod’s CPU and Memory Utilization – FAQs