Bird
0
0

Given this YAML snippet for a Deployment on EKS:

medium📝 Predict Output Q13 of 15
AWS - EKS
Given this YAML snippet for a Deployment on EKS:
apiVersion: apps/v1
kind: Deployment
metadata:
  name: myapp
spec:
  replicas: 3
  selector:
    matchLabels:
      app: myapp
  template:
    metadata:
      labels:
        app: myapp
    spec:
      containers:
      - name: myapp-container
        image: nginx:latest

What will be the number of running pods after applying this deployment?
A1
B3
C0
DDepends on the node capacity
Step-by-Step Solution
Solution:
  1. Step 1: Read the replicas field in the Deployment spec

    The YAML specifies replicas: 3, which means Kubernetes will create 3 pods for this deployment.
  2. Step 2: Understand pod creation behavior

    Unless there is a scheduling issue, Kubernetes will run 3 pods as requested.
  3. Final Answer:

    3 -> Option B
  4. Quick Check:

    replicas = number of pods running [OK]
Quick Trick: replicas field sets pod count in Deployment spec [OK]
Common Mistakes:
  • Assuming only 1 pod runs by default
  • Thinking pods depend on node capacity without error
  • Confusing selector labels with pod count

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes