Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the command to create a ConfigMap named my-config from a literal key-value pair.
Kubernetes
kubectl create configmap my-config --from-literal=[1]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using colon ':' instead of equal sign '='.
Adding extra equal signs in the literal.
Using underscores instead of equal sign.
✗ Incorrect
The correct syntax for creating a ConfigMap from a literal is key=value, so 'app=frontend' is correct.
2fill in blank
mediumComplete the command to create a ConfigMap named settings with two literals: mode=production and debug=false.
Kubernetes
kubectl create configmap settings --from-literal=mode=production [1]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using space instead of equal sign after --from-literal.
Using colon ':' instead of equal sign '='.
Combining literals without repeating --from-literal.
✗ Incorrect
Each literal must be passed with --from-literal=key=value, so '--from-literal=debug=false' is correct.
3fill in blank
hardFix the error in the command to create a ConfigMap named app-config with a literal key 'version' and value '1.0'.
Kubernetes
kubectl create configmap app-config --from-literal=version[1]1.0
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using colon ':' instead of equal sign.
Using double equal signs '=='.
Using dash '-' instead of equal sign.
✗ Incorrect
The correct syntax uses '=' between key and value in literals.
4fill in blank
hardFill both blanks to create a ConfigMap named config with literals for environment=dev and debug=true.
Kubernetes
kubectl create configmap config [1] [2]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using space instead of equal sign after --from-literal.
Not repeating --from-literal for each literal.
Using colon ':' instead of equal sign '='.
✗ Incorrect
Each literal must be passed with --from-literal=key=value, so blanks are filled with '--from-literal=environment=dev' and '--from-literal=debug=true'.
5fill in blank
hardFill all three blanks to create a ConfigMap named full-config with literals: host=localhost, port=8080, and debug=false.
Kubernetes
kubectl create configmap full-config [1] [2] [3]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using space instead of equal sign after --from-literal.
Not repeating --from-literal for each literal.
Using colon ':' instead of equal sign '='.
✗ Incorrect
Each literal must be passed with --from-literal=key=value, so blanks are filled with '--from-literal=host=localhost', '--from-literal=port=8080', and '--from-literal=debug=false'.