0
0
Kubernetesdevops~10 mins

Immutable ConfigMaps 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 create an immutable ConfigMap.

Kubernetes
apiVersion: v1
kind: ConfigMap
metadata:
  name: example-config
immutable: [1]
data:
  key: value
Drag options to blanks, or click blank then click option'
Atrue
Bfalse
C"false"
D"true"
Attempts:
3 left
💡 Hint
Common Mistakes
Using string values like "true" instead of boolean true.
Setting immutable to false which does not make ConfigMap immutable.
2fill in blank
medium

Complete the command to create an immutable ConfigMap from a file.

Kubernetes
kubectl create configmap example-config --from-file=config.txt --[1]
Drag options to blanks, or click blank then click option'
Aimmutable=true=false
Bimmutable=true
Cimmutable=true=true
Dimmutable
Attempts:
3 left
💡 Hint
Common Mistakes
Trying to assign a value to the immutable flag.
Using incorrect flag syntax.
3fill in blank
hard

Fix the error in the ConfigMap YAML to make it immutable.

Kubernetes
apiVersion: v1
kind: ConfigMap
metadata:
  name: example-config
immutable: [1]
data:
  key: value
Drag options to blanks, or click blank then click option'
Atrue
BTrue
Cyes
D"true"
Attempts:
3 left
💡 Hint
Common Mistakes
Using quoted strings instead of boolean values.
Capitalizing boolean values.
4fill in blank
hard

Fill both blanks to complete the command that updates a ConfigMap to be immutable.

Kubernetes
kubectl patch configmap example-config -p '{"immutable": [1], "data": [2]'
Drag options to blanks, or click blank then click option'
Atrue
Bfalse
C{"key":"newvalue"}
D{"key":"value"}
Attempts:
3 left
💡 Hint
Common Mistakes
Using false for immutable when making ConfigMap immutable.
Incorrect JSON format for data.
5fill in blank
hard

Fill all three blanks to create an immutable ConfigMap with a label and data.

Kubernetes
apiVersion: v1
kind: ConfigMap
metadata:
  name: example-config
  labels:
    app: [1]
immutable: [2]
data:
  config.yaml: [3]
Drag options to blanks, or click blank then click option'
Amyapp
Btrue
C"key: value"
Dfalse
Attempts:
3 left
💡 Hint
Common Mistakes
Using false for immutable.
Not quoting the data string.