Cloud and Container Basics
A Deployment with replicas: 10 has the rolling update settings maxSurge: 25% and maxUnavailable: 25%. Which of the following correctly gives the upper limit of the total number of Pods and the lower limit of the number of available Pods during an update?
- AUpper limit 12, lower limit 8
- BUpper limit 13, lower limit 7
- CUpper limit 13, lower limit 8
Show answer and explanation
Answer: C. Upper limit 13, lower limit 8
When a percentage is converted into a number of Pods, maxSurge is rounded up and maxUnavailable is rounded down. 10 × 25% = 2.5, so maxSurge becomes 3 and maxUnavailable becomes 2. The upper limit of the total number of Pods is 10 + 3 = 13, and the lower limit of available Pods is 10 − 2 = 8. This rounding helps the update progress while ensuring that the number of available Pods never falls below the specified percentage.
- A. This rounds maxSurge's 2.5 down. maxSurge is rounded up to 3.
- B. This rounds maxUnavailable's 2.5 up. maxUnavailable is rounded down to 2.
- C. Correct. 10 + 3 = 13 and 10 − 2 = 8.