Update content/en/docs/reference/kubectl/jsonpath.md
Co-authored-by: Daniel Smith <dbsmith@google.com>
This commit is contained in:
@@ -107,7 +107,7 @@ JSONPath regular expressions are not supported. If you want to match using regul
|
||||
# The following command does not work
|
||||
kubectl get pods -o jsonpath='{.items[?(@.metadata.name=~/^test$/)].metadata.name}'
|
||||
|
||||
# The following command achieves the same result
|
||||
# The following command achieves the desired result
|
||||
kubectl get pods -o json | jq -r '.items[] | select(.metadata.name | test("test-")).spec.containers[].image'
|
||||
```
|
||||
{{< /note >}}
|
||||
|
||||
Reference in New Issue
Block a user