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: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: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:-
Export the Current Pod Configuration
Export the current pod configuration to a YAML file by running:
-
Delete the Existing Pod
Remove the current elephant pod with:
-
Edit the YAML Configuration
Open the
elephant.yamlfile using your favorite text editor (e.g.,vi):Locate the section specifying the memory limits and update it from10Mito20Mi. -
Apply the Updated Configuration
Recreate the pod by applying the modified YAML file:
-
Verify the Pod Status
Check to ensure the pod is running:
-
Final Deletion
Once verified, delete the elephant pod as the lab instructions specify:
This concludes the Resource Limits Lab Solutions lesson.