Update jsonpath.md

Adding note that JSONPath in kubectl cli does not currently support RegEx.
This commit is contained in:
Daniel Mendes 2020-08-14 11:31:00 +02:00 committed by GitHub
parent 869be9b545
commit 2a33dfdcd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 20 additions and 0 deletions

View File

@ -98,4 +98,24 @@ kubectl get pods -o=jsonpath="{range .items[*]}{.metadata.name}{\"\t\"}{.status.
```
{{< /note >}}
{{< note >}}
JSONPath RegEx are currently not supported. You must use jq or similar.
Example currently not supported
```shell
kubectl get secrets -o jsonpath='{.items[?(@.metadata.name=~/^test$/)].metadata.name}'
```
{{< /note >}}
{{< note >}}
JSONPath RegEx are currently not supported. You must use jq or similar.
Example currently not supported
```shell
kubectl get secrets -o jsonpath='{.items[?(@.metadata.name=~/^test$/)].metadata.name}'
```
{{< /note >}}