0
0
Kubernetesdevops~10 mins

Rolling update strategy in Kubernetes - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to specify the rolling update strategy type in a Kubernetes deployment.

Kubernetes
strategy:
  type: [1]
Drag options to blanks, or click blank then click option'
ARecreate
BRollingUpdate
CBlueGreen
DCanary
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Recreate' which stops all old pods before starting new ones.
Using 'BlueGreen' or 'Canary' which are not native Kubernetes strategy types.
2fill in blank
medium

Complete the code to set the maximum number of pods that can be unavailable during a rolling update.

Kubernetes
strategy:
  rollingUpdate:
    maxUnavailable: [1]
Drag options to blanks, or click blank then click option'
A50%
B0
C25%
D100%
Attempts:
3 left
💡 Hint
Common Mistakes
Setting maxUnavailable to 0 which means no downtime allowed.
Setting maxUnavailable to 100% which would stop all pods.
3fill in blank
hard

Fix the error in the rolling update configuration by completing the missing field.

Kubernetes
strategy:
  rollingUpdate:
    maxSurge: [1]
Drag options to blanks, or click blank then click option'
A2
Btwo
C200%
D-1
Attempts:
3 left
💡 Hint
Common Mistakes
Using a word like 'two' instead of a number.
Using negative numbers which are invalid.
Using percentages over 100% which is not allowed.
4fill in blank
hard

Fill both blanks to configure a rolling update with 1 max surge and 0 max unavailable pods.

Kubernetes
strategy:
  rollingUpdate:
    maxSurge: [1]
    maxUnavailable: [2]
Drag options to blanks, or click blank then click option'
A1
B0
C25%
D50%
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping maxSurge and maxUnavailable values.
Using percentages when integers are expected.
5fill in blank
hard

Fill all three blanks to create a deployment spec with rolling update strategy, max surge 2, and max unavailable 25%.

Kubernetes
apiVersion: apps/v1
kind: Deployment
metadata:
  name: example-deployment
spec:
  replicas: 3
  strategy:
    type: [1]
    rollingUpdate:
      maxSurge: [2]
      maxUnavailable: [3]
Drag options to blanks, or click blank then click option'
ARollingUpdate
B2
C25%
DRecreate
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Recreate' instead of 'RollingUpdate' for strategy type.
Mixing up maxSurge and maxUnavailable values.