0
0
Kubernetesdevops~10 mins

Taints and tolerations 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 add a taint to a node that prevents pods without tolerations from scheduling.

Kubernetes
kubectl taint nodes node1 key=[1]:NoSchedule
Drag options to blanks, or click blank then click option'
Avalue1
Btrue
Cvalue
DNoExecute
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'true' as the value instead of a string.
Using the effect as the value.
Leaving the value empty.
2fill in blank
medium

Complete the pod spec to tolerate a taint with key 'key' and effect 'NoSchedule'.

Kubernetes
tolerations:
- key: "key"
  operator: "Equal"
  value: "[1]"
  effect: "NoSchedule"
Drag options to blanks, or click blank then click option'
Avalue
Bvalue1
Ctrue
DNoExecute
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'true' as the value instead of the taint's value.
Using the effect as the value.
Leaving the value empty.
3fill in blank
hard

Fix the error in the toleration that causes the pod to not tolerate the taint.

Kubernetes
tolerations:
- key: "key"
  operator: "[1]"
  value: "value"
  effect: "NoSchedule"
Drag options to blanks, or click blank then click option'
AExists
BEqual
CNotExists
DIn
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Exists' which ignores the value.
Using invalid operators like 'NotExists' or 'In'.
4fill in blank
hard

Fill both blanks to create a toleration that tolerates any taint with key 'key' and effect 'NoExecute'.

Kubernetes
tolerations:
- key: "key"
  operator: "[1]"
  effect: "[2]"
Drag options to blanks, or click blank then click option'
AExists
BEqual
CNoSchedule
DNoExecute
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Equal' operator without specifying value.
Using wrong effect like 'NoSchedule'.
5fill in blank
hard

Fill all three blanks to create a pod toleration that matches a taint with key 'key', value 'value', and effect 'NoSchedule'.

Kubernetes
tolerations:
- key: "[1]"
  operator: "[2]"
  value: "[3]"
  effect: "NoSchedule"
Drag options to blanks, or click blank then click option'
Akey
BEqual
Cvalue
DExists
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Exists' operator with a value specified.
Mismatching key or value strings.
Omitting the value field.