Bird
0
0

Given this Kubernetes YAML snippet for a microservice pod:

medium📝 Command Output Q13 of 15
Microservices - Orchestration with Kubernetes
Given this Kubernetes YAML snippet for a microservice pod:
apiVersion: v1
kind: Pod
metadata:
  name: myservice
spec:
  containers:
  - name: app
    image: myapp:v1
    ports:
    - containerPort: 80
What will happen if the pod crashes unexpectedly?
AThe pod will restart only if the image is updated
BThe pod will stay crashed until manually restarted
CKubernetes will automatically restart the pod to keep the service running
DKubernetes will delete the pod and not recreate it
Step-by-Step Solution
Solution:
  1. Step 1: Understand pod restart policy default

    By default, Kubernetes restarts pods automatically if they crash to maintain service availability.
  2. Step 2: Check other options for correctness

    Pods do not stay crashed without restart, nor are they deleted permanently without recreation, and restarts are not tied to image updates.
  3. Final Answer:

    Kubernetes will automatically restart the pod to keep the service running -> Option C
  4. Quick Check:

    Pod auto-restart on crash = D [OK]
Quick Trick: Pods auto-restart by default to keep services alive [OK]
Common Mistakes:
MISTAKES
  • Thinking pods stay crashed until manual restart
  • Believing pods delete permanently on crash
  • Assuming restart depends on image updates

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Microservices Quizzes