Recall & Review
beginner
What is a resource request in Kubernetes?
A resource request is the amount of CPU or memory that 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 resource limit in Kubernetes?
If a container uses more CPU than its limit, Kubernetes throttles it. If it uses more memory than its limit, the container may be terminated (killed).
Click to reveal answer
intermediate
Why should you set both resource requests and limits?
Setting requests ensures your container gets enough resources to run well. Limits prevent it from using too much and affecting other containers.
Click to reveal answer
intermediate
How does Kubernetes use resource requests during scheduling?
Kubernetes checks the resource requests of a pod and finds a node with enough free resources to meet those requests before placing the pod there.
Click to reveal answer
beginner
Give an example of setting CPU and memory requests and limits in a pod spec.
Example YAML snippet:
resources:
requests:
memory: "128Mi"
cpu: "250m"
limits:
memory: "256Mi"
cpu: "500m"
Click to reveal answer
What does a CPU request specify in Kubernetes?
✗ Incorrect
CPU request is the minimum CPU guaranteed to the container.
What happens if a container exceeds its memory limit?
✗ Incorrect
Exceeding memory limit causes the container to be killed.
Why is it important to set resource limits?
✗ Incorrect
Limits prevent containers from using excessive resources.
Which Kubernetes component uses resource requests to schedule pods?
✗ Incorrect
The scheduler uses resource requests to place pods on nodes.
In the resources section, what unit is '500m' CPU?
✗ Incorrect
'm' means milliCPU, so 500m is half a CPU.
Explain the difference between resource requests and limits in Kubernetes.
Think about what Kubernetes guarantees versus what it restricts.
You got /4 concepts.
Describe what happens when a container uses more CPU or memory than its limits.
Consider how Kubernetes controls resource usage to keep the system stable.
You got /3 concepts.