<p>I want to list all nodes which are in ready state except the ones which have any kind of taint on them. How can I achieve this using jsonpath ?</p>

<p>I tried below statement taken from k8s doc but it doesn't print what I want. I am looking for output such as --  <code>node01 node02</code>. There is no master node in the output as it has a taint on it. What kind of taint is not really significant here.</p>

<pre><code>JSONPATH='{range .items[*]}{@.metadata.name}:{range @.status.conditions[*]}{@.type}={@.status};{end}{end}' \
 &amp;&amp; kubectl get nodes -o jsonpath="$JSONPATH" | grep "Ready=True"
</code></pre>

<p>I have successfully listed my nodes that are <code>ready</code> and <code>not tainted</code> using <code>jq</code>.</p>

<p>Here you have all the nodes: </p>

<pre><code>$ kubectl get nodes

gke-standard-cluster-1-default-pool-9c101360-9lvw   Ready    &lt;none&gt;   31s   v1.13.11-gke.9
gke-standard-cluster-1-default-pool-9c101360-fdhr   Ready    &lt;none&gt;   30s   v1.13.11-gke.9
gke-standard-cluster-1-default-pool-9c101360-gq9c   Ready    &lt;none&gt;   31s   v1.13.11-gke.
</code></pre>

<p>Here I have tainted one node: </p>

<pre><code>$ kubectl taint node gke-standard-cluster-1-default-pool-9c101360-9lvw key=value:NoSchedule

node/gke-standard-cluster-1-default-pool-9c101360-9lvw tainted
</code></pre>

<p>And finally a command that list the <code>not tainted</code> and <code>ready</code> nodes: </p>

<pre><code>$ kubectl get nodes -o json | jq -r '.items[] | select(.spec.taints|not) | select(.status.conditions[].reason=="KubeletReady" and .status.conditions[].status=="True") | .metadata.name'

gke-standard-cluster-1-default-pool-9c101360-fdhr
gke-standard-cluster-1-default-pool-9c101360-gq9c
</code></pre>
