In Kubernetes 1.6.x the node taints have moved into the spec. Therefore the above answer by jaxxstorm will not work. Instead, you can use the following template.
I was looking to get the list of nodes that have a specific Taint. I only found this SO answer, so if anybody is looking for this answer, here is the solution:
With something like Taints where it is a map or list and you want it to look clean for parsing with some other tool you can clean them up using you can use something similar to the answer by Edwin Tai but with a little extra smarts to extract the keys.
kubectl get nodes -o=jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.spec.taints[*].key}{"\n"}{end}'
Using this method you can easily create custom outputs
Quick overview of nodes:
kubectl get nodes -o custom-columns=NAME:.metadata.name,ARCH:.status.nodeInfo.architecture,KERNEL:.status.nodeInfo.kernelVersion,KUBLET:.status.nodeInfo.kubeletVersion,CPU:.status.capacity.cpu,RAM:.status.capacity.memory
Overview of pods and where to find them sorted by creation time:
kubectl get pods -A -o custom-columns=NAMESPACE:.metadata.namespace,NAME:.metadata.name,NODE:.spec.nodeName,HOSTIP:.status.hostIP,PHASE:.status.phase,START_TIME:.metadata.creationTimestamp --sort-by=.metadata.creationTimestamp
#Check Node Taints
kubectl get nodes -o=custom-columns=NodeName:.metadata.name,TaintKey:.spec.taints[*].key,TaintValue:.spec.taints[*].value,TaintEffect:.spec.taints[*].effect
Let me try and explain what this first one means and then rest should fall in place:
NodeName:.metadata.name
ColumnName: JSONPATH to the attribute you are looking for.
ColumnName can be anything you want it to be.
Something like NodeName:items[*].metadata.name is equivalent to running $kubectl get nodes -o=jsonpath='{.items[*].metadata.name}' but with custom-columns flag you get values in rows and columns format.
Note: You don't need to start with .items[*]. It already parses that with custom-column flag
so now all the columns explained:
NodeName:.metadata.name - Get Node Names and put it under NodeName Column
TaintKey:.spec.taints[*].key - return all the keys for taints by looking under taints map and put it under TaintKey custom-column
TaintValue:.spec.taints[*].value - same as key but you are returning the value from the taints map.
TaintEffect:.spec.taints[*].effect - same as key but you are returning the effect from the taints map.
You set it under and alias like
alias get-nodetaints="kubectl get nodes -o=custom-columns=NodeName:.metadata.name,TaintKey:.spec.taints[*].key,TaintValue:.spec.taints[*].value,TaintEffect:.spec.taints[*].effect"
and you have your own nice command to get all taints and your output should look something like below