MYHOSPITALNOW.COM

Find Trusted Doctors & Hospitals

Discover healthcare providers, compare hospitals, and explore treatment options worldwide.

Free Treatment Quotes • Doctor Search • Hospital Comparison

Find Healthcare Options

www.myhospitalnow.com

Kubernetes Resource requests and limits of Pod and Container

CPU and memory are each a resource type. A resource type has a base unit. CPU represents compute processing and is specified in units of Kubernetes CPUs. Memory is specified in units of bytes.

requests and limits can only be specified on individual Containers.

Each Container of a Pod can specify one or more of the following:

spec.containers[].resources.limits.cpu
spec.containers[].resources.limits.memory
spec.containers[].resources.limits.hugepages-
spec.containers[].resources.requests.cpu
spec.containers[].resources.requests.memory
spec.containers[].resources.requests.hugepages-

resource request
When you specify the resource request for Containers in a Pod, the scheduler uses this information to decide which node to place the Pod on.

resource limit
When you specify a 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.

The kubelet also reserves at least the request amount of that system resource specifically for that container to use. If the node where a Pod is running has enough of a resource available, it’s possible (and allowed) for a container to use more resource than its request for that resource specifies. However, a container is not allowed to use more than its resource limit.

CPU and memory are each a resource type. A resource type has a base unit. CPU represents compute processing and is specified in units of Kubernetes CPUs. Memory is specified in units of bytes.

When you create a Pod, the Kubernetes scheduler selects a node for the Pod to run on. Each node has a maximum capacity for each of the resource types: the amount of CPU and memory it can provide for Pods. The scheduler ensures that, for each resource type, the sum of the resource requests of the scheduled Containers is less than the capacity of the node.

If a Container exceeds its memory limit, it might be terminated. If it is restartable, the kubelet will restart it, as with any other type of runtime failure.

If a Container exceeds its memory request, it is likely that its Pod will be evicted whenever the node runs out of memory.

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services — all in one place.

Explore Hospitals
I'm Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms. I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.

Related Posts

Kubernetes ResourceQuota & LimitRange Example Programs

Kubernetes ResourceQuota and LimitRange are two important mechanisms for managing resource allocation and usage within a Kubernetes cluster. Here’s a comparison of ResourceQuota and LimitRange features and…

Read More

Openshif: Create a busybox pod

This page shows how to start a temporary BusyBox pod in OpenShift with oc run. The pod passes the restricted security policies, so you can test DNS,…

Read More

OpenShift Lab 10: View Pod, Workload, and Namespace Performance Metrics Using the OpenShift Web Console

This lab uses the OpenShift web console to view CPU, memory, network and pod metrics for one namespace and its workloads. It then checks the same numbers…

Read More

Portfolio Prioritisation in IT: How to Balance Capacity, Dependencies and Delivery Risk

IT organisations rarely suffer from a shortage of worthwhile initiatives. There is always another platform to modernise, a security programme that cannot wait, an ERP or cloud…

Read More

Kubernetes ReplicaSet Explained: API Resource, YAML Example, and Use Cases

Rajesh Kumar I’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have…

Read More

What Is GitHub Actions Runner Controller?

GitHub Actions is a CI/CD platform that automates tasks such as building applications, running tests, creating Docker images, and deploying software. Every GitHub Actions job requires a…

Read More