Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the command to create a ConfigMap named my-config from the file app.properties.
Kubernetes
kubectl create configmap my-config --from-file=[1]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using a wrong filename that does not exist.
Confusing file extensions.
✗ Incorrect
The
--from-file option takes the filename to create the ConfigMap from. Here, app.properties is the correct file.2fill in blank
mediumComplete the command to create a ConfigMap named config-map from multiple files in the directory config/.
Kubernetes
kubectl create configmap config-map --from-file=[1]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using a wrong directory name.
Using a single file name instead of a directory.
✗ Incorrect
Using
--from-file=config/ includes all files in the config/ directory into the ConfigMap.3fill in blank
hardFix the error in the command to create a ConfigMap named app-config from the file settings.conf.
Kubernetes
kubectl create configmap app-config --from-file=[1]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Misspelling the file name.
Adding extra extensions like .yaml or .json.
✗ Incorrect
The file name must exactly match the existing file. Here,
settings.conf is correct.4fill in blank
hardFill both blanks to create a ConfigMap named multi-config from two files: db.conf and app.conf.
Kubernetes
kubectl create configmap multi-config --from-file=[1] --from-file=[2]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect file names.
Trying to combine files in one
--from-file option.✗ Incorrect
Use
--from-file=db.conf and --from-file=app.conf to include both files in the ConfigMap.5fill in blank
hardFill all three blanks to create a ConfigMap named full-config from files frontend.conf, backend.conf, and database.conf.
Kubernetes
kubectl create configmap full-config --from-file=[1] --from-file=[2] --from-file=[3]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong file names.
Trying to list multiple files in one
--from-file option.✗ Incorrect
Each
--from-file option should specify one of the files to include in the ConfigMap.