Kubernetes CKA sample exam question 39 with answer

Question
List all ConfigMap and Secret objects in the cluster in all namespaces and write th output to configmap-secret file

Answer
It is pretty straighforward:

kubectl get cm,secret -A
Redirect it to a file:
kubectl get cm,secret -A > configmap-secret
Verify:
cat configmap-secret