In Kubernetes, what happens if a container uses more memory than its memory request but less than its memory limit?
Think about how Kubernetes manages resources when the node is under memory pressure.
Memory requests define the guaranteed memory for a container. If usage goes above the request but below the limit, the container can continue running but may be evicted if the node runs low on memory.
You run the command kubectl describe pod mypod. Which section shows the memory requests and limits for containers?
kubectl describe pod mypodMemory settings are part of container resource specifications.
The kubectl describe pod command shows resource requests and limits under each container's details in the Containers section.
Which YAML snippet correctly sets a memory request of 256Mi and a memory limit of 512Mi for a container?
Check the correct indentation and units for memory in Kubernetes YAML.
Memory requests and limits must be under resources.requests.memory and resources.limits.memory with units like Mi (mebibytes).
A pod is repeatedly evicted with the message OOMKilled. What is the most likely cause?
OOMKilled means Out Of Memory killed by the system.
When a container uses more memory than its limit, the system kills it to protect the node.
Which practice helps ensure stable Kubernetes cluster performance regarding memory requests and limits?
Think about balancing guaranteed resources and flexibility.
Setting requests based on typical usage ensures guaranteed resources, while limits above peak usage prevent excessive memory use and evictions.