Complete the command to update a ConfigMap named 'app-config' from a file 'config.yaml'.
kubectl create configmap app-config --from-file=[1] --dry-run=client -o yaml | kubectl apply -f -
The --from-file option specifies the source file for the ConfigMap. Here, 'config.yaml' is the correct file.
Complete the command to patch a ConfigMap named 'app-config' with a new key 'log_level' set to 'debug'.
kubectl patch configmap app-config -p '{"data": {"[1]": "debug"}}'
The key name in the ConfigMap data is 'log_level' exactly as specified.
Fix the error in the command to reload pods after ConfigMap update by adding the correct annotation key.
kubectl patch deployment my-app -p '{"spec": {"template": {"metadata": {"annotations": {"[1]": "$(date +%s)"}}}}}'
The correct annotation key to trigger pod restart is kubectl.kubernetes.io/restartedAt.
Fill both blanks to create a ConfigMap from literal key-value pairs and apply it.
kubectl create configmap my-config [1]=value1 [2]=value2 --dry-run=client -o yaml | kubectl apply -f -
Use --from-literal=key1 and --from-literal=key2 to create ConfigMap entries from literal values.
Fill all three blanks to update a ConfigMap, patch a deployment to restart pods, and verify pods status.
kubectl create configmap app-config --from-file=[1] --dry-run=client -o yaml | kubectl apply -f - && kubectl patch deployment my-app -p '{"spec": {"template": {"metadata": {"annotations": {"[2]": "$(date +%s)"}}}}}' && kubectl get pods -l app=my-app -o [3]
Use 'config.yaml' as the source file, the correct annotation key 'kubectl.kubernetes.io/restartedAt' to restart pods, and 'wide' output format to see pod details.