Is it possible to combine oc/kubectl's JSONPath expressions with AND/OR/NOT?

Solution Unverified - Updated -

Issue

  • I want to extract the node that has node-role.kubernetes.io/worker= label but does not have node-role.kubernetes.io/infra= label. Is this possible with one command using oc/kubectl?
  • JSONPath expressions can be used in oc/kubectl. Is it possible to combine the JSONPath expressions with AND/OR/NOT?

Environment

  • Red Hat OpenShift Container Platform (RHOCP)
    • 4

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content