Question
Write the information about nodes and their taints into file CKAC0046.txt.
The output format:
{"name": "name_value".
"taints": "taint_value"}
Answerkubectl get nodes -o json | jq ".items[]|{name:.metadata.name, taints:.spec.taints}"
This will output in format described above.kubectl get nodes -o json | jq ".items[]|{name:.metadata.name, taints:.spec.taints}" > CKAC0046.txt
Check:
cat CKAC0046.txt