From 2a33dfdcd6f83b7d03036c2a2ddbab7dcc2e960d Mon Sep 17 00:00:00 2001 From: Daniel Mendes Date: Fri, 14 Aug 2020 11:31:00 +0200 Subject: [PATCH] Update jsonpath.md Adding note that JSONPath in kubectl cli does not currently support RegEx. --- content/en/docs/reference/kubectl/jsonpath.md | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/content/en/docs/reference/kubectl/jsonpath.md b/content/en/docs/reference/kubectl/jsonpath.md index 50c051c9f4..e7087bbdea 100644 --- a/content/en/docs/reference/kubectl/jsonpath.md +++ b/content/en/docs/reference/kubectl/jsonpath.md @@ -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 >}} +