Complete the code to create an immutable ConfigMap.
apiVersion: v1
kind: ConfigMap
metadata:
name: example-config
immutable: [1]
data:
key: valueSetting immutable: true makes the ConfigMap immutable, preventing changes after creation.
Complete the command to create an immutable ConfigMap from a file.
kubectl create configmap example-config --from-file=config.txt --[1]
The --immutable flag is used without an equals sign to create an immutable ConfigMap.
Fix the error in the ConfigMap YAML to make it immutable.
apiVersion: v1
kind: ConfigMap
metadata:
name: example-config
immutable: [1]
data:
key: valueThe immutable field requires a lowercase boolean true without quotes.
Fill both blanks to complete the command that updates a ConfigMap to be immutable.
kubectl patch configmap example-config -p '{"immutable": [1], "data": [2]'
Set immutable to true and update data with the new key-value pair.
Fill all three blanks to create an immutable ConfigMap with a label and data.
apiVersion: v1
kind: ConfigMap
metadata:
name: example-config
labels:
app: [1]
immutable: [2]
data:
config.yaml: [3]Label the ConfigMap with myapp, set immutable to true, and provide the data as a string.
