Skip to main content
In this lesson, we will walk through the solutions for the resource limits lab. Follow the steps below to verify CPU requirements for the “rabbit” pod, troubleshoot the “elephant” pod, and update its memory configuration.

Question 1: Verifying CPU Requirements for the “rabbit” Pod

A pod named rabbit is deployed, and our task is to determine its CPU settings. Run the following command to describe the pod:
Scroll through the output until you find the resources section. You should see details such as:
From the above information, notice that the CPU request is set to 1 while the limit is 2. This indicates that the pod is configured to run with one CPU. After verification, delete the rabbit pod with the command:

Question 2: Troubleshooting the “elephant” Pod

The elephant pod, deployed in the default namespace, is not reaching a running state. To diagnose the issue, describe the pod using:
In the output, locate the Last State section. You might observe output similar to the following:
The OOMKilled status indicates the pod was terminated because it ran out of memory. The pod has a memory limit set at 10Mi, but its process needs 15 MB.

Question 3: Increasing the Memory Limit for the “elephant” Pod

To resolve the OOMKilled issue, follow these steps to increase the memory limit from 10Mi to 20Mi:
  1. Export the Current Pod Configuration Export the current pod configuration to a YAML file by running:
  2. Delete the Existing Pod Remove the current elephant pod with:
  3. Edit the YAML Configuration Open the elephant.yaml file using your favorite text editor (e.g., vi):
    Locate the section specifying the memory limits and update it from 10Mi to 20Mi.
  4. Apply the Updated Configuration Recreate the pod by applying the modified YAML file:
  5. Verify the Pod Status Check to ensure the pod is running:
  6. Final Deletion Once verified, delete the elephant pod as the lab instructions specify:
After completing these steps and confirming that the pod eventually reaches a running state, you have successfully completed the resource limits lab.
This concludes the Resource Limits Lab Solutions lesson.

Watch Video