Bird
0
0

Given this YAML snippet for a pod:

medium📝 Command Output Q13 of 15
Microservices - Orchestration with Kubernetes
Given this YAML snippet for a pod:
apiVersion: v1
kind: Pod
metadata:
  name: myapp-pod
spec:
  containers:
  - name: myapp-container
    image: nginx:latest
    ports:
    - containerPort: 80
What will kubectl get pods myapp-pod show after creation?
ANAME READY STATUS RESTARTS AGE myapp-pod 1/1 Completed 0 0s
BError: pod not found
CNAME READY STATUS RESTARTS AGE myapp-pod 0/1 Pending 0 0s
DNAME READY STATUS RESTARTS AGE myapp-pod 1/1 Running 0 0s
Step-by-Step Solution
Solution:
  1. Step 1: Understand pod creation from YAML

    The YAML defines a pod with one container running nginx, exposing port 80.
  2. Step 2: Predict pod status after creation

    Immediately after creation, the pod should be running with 1 container ready, so status is Running and READY is 1/1.
  3. Final Answer:

    NAME READY STATUS RESTARTS AGE myapp-pod 1/1 Running 0 0s -> Option D
  4. Quick Check:

    Pod created and running = READY 1/1 Running [OK]
Quick Trick: New pod with valid image shows READY 1/1 Running [OK]
Common Mistakes:
MISTAKES
  • Expecting Pending status without reason
  • Confusing Completed with Running
  • Assuming pod not found immediately after creation

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Microservices Quizzes