Member-only story

Small-sized Pod Kubernetes

Luca Berton
4 min readOct 30, 2024

When defining resource requests and limits for a small-sized Pod in Kubernetes, you typically set low values for both CPU and memory to ensure that the Pod consumes minimal resources. Resource requests indicate the minimum amount of resources the Pod needs to be scheduled on a Node, while limits specify the maximum resources the Pod is allowed to use.

Here’s a small-sized Pod configuration with appropriate resource requests and limits:

Example: Small-Sized Pod Resource Limits

apiVersion: v1
kind: Pod
metadata:
name: small-pod-example
spec:
containers:
- name: nginx
image: nginx
resources:
requests:
memory: "32Mi" # Requesting 32 MiB of memory
cpu: "100m" # Requesting 100 milli-CPU (0.1 CPU core)
limits:
memory: "64Mi" # Maximum memory limit is 64 MiB
cpu: "200m" # Maximum CPU limit is 200 milli-CPU (0.2 CPU core)

Breakdown:

requests:

  • memory: "32Mi": This is the minimum amount of memory the Pod will get. If a Node does not have at least 32 MiB available, the Pod won't be scheduled on that Node.
  • cpu: "100m": This requests 0.1 of a CPU core. The Pod will get at least this much CPU time.

--

--

Luca Berton
Luca Berton

Written by Luca Berton

I help creative Automation DevOps, Cloud Engineer, System Administrator, and IT Professional to succeed with Ansible Technology to automate more things everyday

No responses yet