0
0
Kubernetesdevops~5 mins

Memory requests and limits in Kubernetes - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is a memory request in Kubernetes?
A memory request is the amount of memory a container is guaranteed to have. Kubernetes uses this to decide which node can run the container.
Click to reveal answer
beginner
What happens if a container exceeds its memory limit in Kubernetes?
If a container uses more memory than its limit, Kubernetes may terminate the container to protect the node's stability.
Click to reveal answer
intermediate
Why should you set both memory requests and limits?
Setting both helps Kubernetes schedule containers efficiently and prevents any container from using too much memory and affecting others.
Click to reveal answer
intermediate
How does Kubernetes use memory requests during scheduling?
Kubernetes checks if a node has enough free memory to meet the container's memory request before placing it there.
Click to reveal answer
beginner
What is the difference between memory request and memory limit?
Memory request is the minimum memory guaranteed to a container. Memory limit is the maximum memory the container can use before being terminated.
Click to reveal answer
What does the memory request specify in a Kubernetes pod?
AThe minimum memory guaranteed to the container
BThe maximum memory the container can use
CThe total memory of the node
DThe CPU usage limit
What happens if a container exceeds its memory limit?
AThe container is terminated by Kubernetes
BThe container is given more memory automatically
CNothing happens, it continues running
DThe node shuts down
Why is it important to set memory requests?
ATo increase network bandwidth
BTo limit CPU usage
CTo help Kubernetes schedule pods on nodes with enough memory
DTo set disk space limits
If a pod has a memory request of 500Mi and a limit of 1Gi, what does this mean?
AThe pod can only use 500Mi memory
BThe pod is guaranteed 500Mi memory and can use up to 1Gi
CThe pod must use exactly 1Gi memory
DThe pod has no memory limits
What is the risk of not setting memory limits?
AThe container will use less memory
BThe container will not start
CThe pod will be scheduled on the wrong node
DA container might use too much memory and crash the node
Explain how memory requests and limits work together in Kubernetes to manage container memory.
Think about how Kubernetes decides where to place containers and what happens if they use too much memory.
You got /4 concepts.
    Describe why setting memory requests and limits is important for a stable Kubernetes cluster.
    Consider what happens if one container uses too much memory without limits.
    You got /4 concepts.