Question
How many nodes exist without label node-role.kubernetes.io/master? Count the number and write in file /tmp/node-count.txt
Answer
This is yet another example of using node labels:
kubectl get no --selector='!node-role.kubernetes.io/master' --no-headers | wc -l > /tmp/node-count.txt