Bird
0
0

You set maxSurge to "two" (string) instead of 2 (integer) in your Deployment YAML. What will happen when you apply this configuration?

medium📝 Troubleshoot Q6 of 15
Kubernetes - ReplicaSets and Deployments
You set maxSurge to "two" (string) instead of 2 (integer) in your Deployment YAML. What will happen when you apply this configuration?
AThe deployment will fail to apply due to invalid type error
BThe deployment will ignore maxSurge and use default value
CThe deployment will treat "two" as 2 and proceed
DThe deployment will roll out with maxSurge set to 0
Step-by-Step Solution
Solution:
  1. Step 1: Understand YAML type requirements

    maxSurge expects an integer or string with percentage, not a word string.
  2. Step 2: Effect of invalid type on deployment

    Applying a string like "two" causes a validation error and deployment fails.
  3. Final Answer:

    The deployment will fail to apply due to invalid type error -> Option A
  4. Quick Check:

    Invalid type causes apply failure [OK]
Quick Trick: Use integers or percentages, not words for maxSurge [OK]
Common Mistakes:
  • Assuming Kubernetes auto-converts strings to numbers
  • Thinking invalid values are ignored silently
  • Confusing string and integer types in YAML

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes