Jump into concepts and practice - no test required
or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Recall & Review
beginner
What does it mean when a Kubernetes Pod is in the Pending state?
A Pod in Pending state means Kubernetes has accepted the Pod request but has not yet scheduled it to run on any node.
Click to reveal answer
beginner
Name one common reason why a Pod might stay in Pending state.
One common reason is that there are not enough resources (CPU, memory) available on any node to run the Pod.
Click to reveal answer
beginner
Which command helps you check why a Pod is stuck in Pending state?
Use `kubectl describe pod ` to see detailed events and messages explaining why the Pod is Pending.
Click to reveal answer
intermediate
How can node selectors affect a Pod stuck in Pending state?
If a Pod has node selectors that don't match any available node, Kubernetes cannot schedule it, so it stays Pending.
Click to reveal answer
intermediate
What is a quick way to check if your cluster has enough resources for a Pending Pod?
Check node resource usage with `kubectl get nodes` and `kubectl describe node ` to see available CPU and memory.
Click to reveal answer
What does the Pending state of a Pod indicate?
APod is waiting to be scheduled on a node
BPod is running successfully
CPod has completed its task
DPod is being deleted
✗ Incorrect
Pending means the Pod is accepted but not yet assigned to a node.
Which command helps diagnose why a Pod is Pending?
Akubectl delete pod <pod-name>
Bkubectl get services
Ckubectl logs <pod-name>
Dkubectl describe pod <pod-name>
✗ Incorrect
The describe command shows events and reasons for Pending state.
If no nodes have enough CPU or memory, what happens to the Pod?
AIt restarts repeatedly
BIt runs on any node anyway
CIt stays in Pending state
DIt gets deleted automatically
✗ Incorrect
Pods cannot be scheduled without enough resources, so they remain Pending.
What role do node selectors play in Pod scheduling?
AThey restrict which nodes a Pod can run on
BThey increase Pod resource limits
CThey delete nodes automatically
DThey change Pod container images
✗ Incorrect
Node selectors limit scheduling to nodes matching specific labels.
Which kubectl command shows node resource availability?
Akubectl logs <pod-name>
Bkubectl describe node <node-name>
Ckubectl get pods
Dkubectl exec <pod-name>
✗ Incorrect
Describing a node shows its CPU and memory usage and capacity.
Explain the main reasons a Kubernetes Pod might stay in Pending state and how to check them.
Think about scheduling and resource availability.
You got /3 concepts.
Describe the steps you would take to troubleshoot a Pod stuck in Pending state.
Start from the Pod, then look at nodes and scheduling rules.
You got /3 concepts.
Practice
(1/5)
1. What does it usually mean when a Kubernetes Pod is stuck in the Pending state?
easy
A. Kubernetes cannot find a suitable node to run the Pod.
B. The Pod has completed its task and is terminating.
C. The Pod is running but not responding to requests.
D. The Pod has been deleted from the cluster.
Solution
Step 1: Understand Pod lifecycle states
The Pending state means the Pod is created but not yet scheduled to a node.
Step 2: Identify reason for Pending
Pending usually happens when no node meets the Pod's resource or scheduling requirements.
Final Answer:
Kubernetes cannot find a suitable node to run the Pod. -> Option A
Quick Check:
Pending = No suitable node found [OK]
Hint: Pending means no node fits Pod's needs [OK]
Common Mistakes:
Confusing Pending with Running state
Thinking Pending means Pod is deleted
Assuming Pending means Pod is ready
2. Which kubectl command helps you see detailed reasons why a Pod is stuck in Pending state?
easy
A. kubectl get pods
B. kubectl describe pod
C. kubectl logs
D. kubectl delete pod
Solution
Step 1: Identify command to get detailed Pod info
kubectl describe pod shows events and status details for the Pod.
Step 2: Confirm command usage
This command reveals scheduling failures or resource issues causing Pending.
Final Answer:
kubectl describe pod <pod-name> -> Option B
Quick Check:
Describe Pod = Detailed status [OK]
Hint: Use describe to see Pod events and reasons [OK]
Common Mistakes:
Using get pods only shows summary, not reasons
Using logs shows container logs, not scheduling info
Deleting Pod does not show status
3. Given this kubectl describe pod mypod output snippet:
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedScheduling 2m default-scheduler 0/3 nodes are available: 3 Insufficient cpu.
What is the main reason the Pod is stuck in Pending?
medium
A. There is no node with enough CPU available.
B. The Pod image is not found.
C. The Pod has a syntax error in its YAML.
D. The Pod is already running on another node.
Solution
Step 1: Analyze the event message
The message says "0/3 nodes are available: 3 Insufficient cpu." meaning no node has enough CPU resources.
Step 2: Understand impact on scheduling
Without enough CPU, the scheduler cannot place the Pod, so it stays Pending.
Final Answer:
There is no node with enough CPU available. -> Option A
Quick Check:
Insufficient CPU = Pod Pending [OK]
Hint: Look for 'Insufficient cpu' in describe events [OK]
Common Mistakes:
Confusing image errors with scheduling errors
Assuming YAML syntax causes Pending
Thinking Pod runs on multiple nodes
4. You see a Pod stuck in Pending state. You check kubectl describe pod and find the message: 0/2 nodes are available: 2 node(s) didn't match Pod's node selector. What should you do to fix this?
medium
A. Delete the Pod and recreate it without changes.
B. Increase the Pod's CPU requests to match node capacity.
C. Remove or correct the Pod's nodeSelector labels to match available nodes.
D. Restart the Kubernetes cluster.
Solution
Step 1: Understand nodeSelector impact
The Pod's nodeSelector restricts scheduling to nodes with matching labels.
Step 2: Fix nodeSelector to match nodes
Adjust or remove nodeSelector so nodes in cluster match Pod requirements.
Final Answer:
Remove or correct the Pod's nodeSelector labels to match available nodes. -> Option C
Quick Check:
nodeSelector mismatch = fix labels [OK]
Hint: Check and fix nodeSelector labels to match nodes [OK]
Common Mistakes:
Increasing CPU requests worsens scheduling
Deleting Pod without fixing selector won't help
Restarting cluster is unnecessary
5. A Pod requests 4 CPUs but all nodes in your cluster have only 2 CPUs each. The Pod stays Pending. Which is the best way to fix this?
hard
A. Change the Pod's image to a smaller size.
B. Reduce the Pod's CPU request to 2 or less.
C. Remove resource requests from the Pod spec.
D. Add a node with at least 4 CPUs to the cluster.
Solution
Step 1: Understand resource requests vs node capacity
The Pod requests 4 CPUs but nodes have only 2 CPUs, so no node can run it.
Step 2: Choose solution to meet resource needs
Adding a node with enough CPUs allows the Pod to be scheduled properly.
Final Answer:
Add a node with at least 4 CPUs to the cluster. -> Option D
Quick Check:
Pod CPU request > node CPU = add bigger node [OK]
Hint: Match Pod CPU request with node CPU capacity [OK]
Common Mistakes:
Reducing CPU request may not be possible or desired