kubectl wait on arbitrary JSON path

Included in v1.23 from November 2021 is the ability for kubectl wait to wait on an arbitrary JSON path.

Note: jsonpath expressions that lead to a nested object or list are not supported

# --for=jsonpath='{}'=value
# Wait for the pod "busybox1" to contain the status phase to be "Running".
kubectl wait --for=jsonpath='{.status.phase}'=Running pod/busybox1
kubectl wait --for=jsonpath='{.status.containerStatuses[0].ready}'=true pod/busybox1
kubectl wait --for=jsonpath='{.spec.containers[0].ports[0].containerPort}'=80 pod/busybox1
kubectl wait --for=jsonpath='{.spec.nodeName}'=knode0 pod/busybox1

Ref: