mediumMultiple Choice
CV0-004 Practice Question: Deploys the Kubernetes manifest shown in the…
Exhibit
Refer to the exhibit.
```yaml
# deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: frontend
spec:
replicas: 3
selector:
matchLabels:
app: frontend
template:
metadata:
labels:
app: frontend
spec:
containers:
- name: nginx
image: nginx:1.21
ports:
- containerPort: 80
resources:
requests:
memory: "256Mi"
cpu: "250m"
limits:
memory: "512Mi"
cpu: "500m"
---
apiVersion: v1
kind: Service
metadata:
name: frontend-service
spec:
type: LoadBalancer
selector:
app: frontend
ports:
- protocol: TCP
port: 80
targetPort: 80
```A cloud engineer deploys the Kubernetes manifest shown in the exhibit. After deployment, the frontend pods are in CrashLoopBackOff state. The engineer checks the logs and finds 'OOMKilled' errors. Which of the following changes would resolve the issue?
⚠ Common exam trap
CompTIA often tests the distinction between resource limits (memory vs. CPU) and scaling strategies, trapping candidates who confuse horizontal scaling (replicas) with vertical scaling (resource limits).
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Increase the memory limit to 1Gi.
The 'OOMKilled' error indicates the container's memory usage exceeded its configured limit, causing the kernel's Out-Of-Memory (OOM) killer to terminate the process. Increasing the memory limit to 1Gi provides the container with more memory headroom, preventing the OOM kill and allowing the pod to run without crashing.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Increase the memory limit to 1Gi.
Why this is correct
OOMKilled means the container exceeded its memory limit and the kernel terminated it. Raising the limit to 1Gi gives the frontend pods sufficient headroom, preventing the kubelet from killing them and ending the CrashLoopBackOff cycle.
- ✗
Increase the number of replicas to 5.
Why it's wrong here
Adding replicas multiplies the number of pods but each replica still exceeds its memory limit, so OOMKilled persists. It is tempting because CrashLoopBackOff suggests insufficient capacity, and scaling replicas would be correct for handling increased traffic when resources per pod are adequate.
- ✗
Reduce the CPU limit to 250m.
Why it's wrong here
OOMKilled means the container exceeded its memory limit, so lowering the CPU limit addresses a different resource and leaves the memory ceiling unchanged. It is tempting because CPU and memory limits sit together in the manifest, and reducing CPU would be correct when pods are throttled rather than killed.
- ✗
Change the service type to ClusterIP.
Why it's wrong here
Changing the service type to ClusterIP alters how traffic reaches the pods, not the container memory limit that triggers OOMKilled. It is tempting because service misconfiguration also causes pod failures, and ClusterIP would be correct when pods must be reachable only inside the cluster.
Visual reference
Go deeper
Related to this question
About these practice questions
This CV0-004 question is part of Courseiva's 834-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This CV0-004 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CV0-004 exam.