skip to content
Alvin Lucillo

Basic jsonpath query

/ 1 min read

The example below uses basic jsonpath query. The config command uses a specific config file and iterates the items of users property, which contains all users the config. For each item, you can select a field, which in this case is name.

k config view --kubeconfig=/root/my-kube-config -o jsonpath="{.users[*].name}"
aws-user dev-user test-user