4. You deployed a pod with resource limits but it keeps getting killed. What is the likely cause?
medium
A. The pod has no liveness probe defined.
B. The pod exceeded its memory limit and was terminated by Kubernetes.
C. The pod is missing a readiness probe.
D. The pod's image is too large.
Solution
Step 1: Understand resource limits effect
Kubernetes kills pods that exceed their memory limits to protect node stability.
Step 2: Link pod termination to resource limits
If pod is killed repeatedly, likely it uses more memory than allowed.
Final Answer:
The pod exceeded its memory limit and was terminated by Kubernetes. -> Option B
Quick Check:
Memory limit exceeded = pod killed [OK]
Hint: Check pod memory usage against limits if it keeps restarting [OK]
Common Mistakes:
Assuming missing probes cause pod kills
Blaming image size for pod termination
Confusing readiness and liveness probes with resource limits
5. You want to make your Kubernetes app production-ready by ensuring it recovers quickly from failures and does not overload the cluster. Which combination should you configure?
hard
A. Set liveness and readiness probes, and define resource requests and limits.
B. Only set resource limits without probes.
C. Use ConfigMaps to store environment variables and skip probes.
D. Deploy without resource limits but add multiple replicas.
Solution
Step 1: Identify production readiness needs
Recovery from failures requires health checks; avoiding overload needs resource limits.
Step 2: Match Kubernetes features to needs
Liveness and readiness probes help detect and recover from failures; resource requests and limits control cluster usage.
Final Answer:
Set liveness and readiness probes, and define resource requests and limits. -> Option A
Quick Check:
Probes + resource limits = production readiness [OK]
Hint: Combine probes with resource limits for stable production apps [OK]
Common Mistakes:
Skipping probes and relying only on resource limits
Using ConfigMaps instead of health checks
Ignoring resource limits and risking cluster overload