Bird
0
0

Given this Kubernetes deployment snippet for progressive delivery:

medium📝 Command Output Q13 of 15
Kubernetes - Advanced Deployment Patterns
Given this Kubernetes deployment snippet for progressive delivery:
apiVersion: apps/v1
kind: Deployment
metadata:
  name: myapp-v2
  labels:
    version: v2
spec:
  replicas: 2
  selector:
    matchLabels:
      version: v2
  template:
    metadata:
      labels:
        version: v2
    spec:
      containers:
      - name: myapp
        image: myapp:2.0

What does this configuration do?
ADeploys two pods running version 2.0 of myapp labeled as v2
BDeletes all pods labeled v2 and replaces with version 1.0
CCreates a service exposing version 1.0 of myapp
DScales the existing deployment to zero replicas
Step-by-Step Solution
Solution:
  1. Step 1: Analyze deployment metadata and labels

    The deployment is named myapp-v2 and uses label version: v2 for pods.
  2. Step 2: Check replicas and container image

    It creates 2 replicas running image myapp:2.0, matching label v2.
  3. Final Answer:

    Deploys two pods running version 2.0 of myapp labeled as v2 -> Option A
  4. Quick Check:

    Deployment with replicas=2 and image v2 = Deploys two pods running version 2.0 of myapp labeled as v2 [OK]
Quick Trick: Look for replicas and image tags to identify deployment version [OK]
Common Mistakes:
  • Confusing deployment labels with service exposure
  • Assuming deletion instead of creation
  • Mixing version labels with scaling actions

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes