Hacker News new | ask | show | jobs
by adolph 1023 days ago
> it's the unintuitive query syntax and the need to search for every minute step

I love jq as a power tool and have the same challenges. I think the best path would have been for JavaScript to adopt something akin to JsonPath, although I more often reach to jq out of familiarity than use it in kubectl.

https://kubernetes.io/docs/reference/kubectl/jsonpath/

1 comments

Maybe Kubernetes should make use of libjq (or gojq or...)
I hadn't looked into JsonPath as a standard, and on closer inspection, it looks to be stalled out. Maybe I'll keep piping kubectl get <resource> -ojson | jq '<what I'm looking for>'.

https://github.com/jsonpath-standard

https://datatracker.ietf.org/wg/jsonpath/about/