Merge pull request #42263 from mengjiao-liu/fix-jsonpath

Fix inconsistent command in the JSONPath Support page
pull/42361/head
Kubernetes Prow Robot 2023-08-02 10:04:44 -07:00 committed by GitHub
commit a283f1bc70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -108,6 +108,6 @@ JSONPath regular expressions are not supported. If you want to match using regul
kubectl get pods -o jsonpath='{.items[?(@.metadata.name=~/^test$/)].metadata.name}'
# The following command achieves the desired result
kubectl get pods -o json | jq -r '.items[] | select(.metadata.name | test("test-")).spec.containers[].image'
kubectl get pods -o json | jq -r '.items[] | select(.metadata.name | test("test-")).metadata.name'
```
{{< /note >}}