You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
kubectl get pods -o=jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.status.startTime}{"\n"}{end}'`
When I paste this into a Windows command prompt, I get the error error: error parsing jsonpath '{range, unclosed action.
Proposed Solution:
On Windows, you need to use double quotes around JSONPaths with spaces in them. This in turn means you need to use a single quote or an escaped double quote around literals:
kubectl get pods -o=jsonpath="{range .items[*]}{.metadata.name}{'\t'}{.status.startTime}{'\n'}{end}"
kubectl get pods -o=jsonpath="{range .items[*]}{.metadata.name}{\"\t\"}{.status.startTime}{\"\n\"}{end}"
This is a...
Problem:
The page https://kubernetes.io/docs/reference/kubectl/jsonpath/ gives the following as an example of JSONPath usage:
When I paste this into a Windows command prompt, I get the error
error: error parsing jsonpath '{range, unclosed action
.Proposed Solution:
On Windows, you need to use double quotes around JSONPaths with spaces in them. This in turn means you need to use a single quote or an escaped double quote around literals:
Page to Update:
https://kubernetes.io/docs/reference/kubectl/jsonpath/
The text was updated successfully, but these errors were encountered: