Fixing the output of jsonpath (#14387)
Items is an array and the [ ] are missing in the jsonpathpull/14413/head
parent
df4ef9be9b
commit
e2f8ae097e
|
@ -114,7 +114,7 @@ The job name and pod name are different.
|
|||
|
||||
```shell
|
||||
# Replace "hello-4111706356" with the job name in your system
|
||||
pods=$(kubectl get pods --selector=job-name=hello-4111706356 --output=jsonpath={.items.metadata.name})
|
||||
pods=$(kubectl get pods --selector=job-name=hello-4111706356 --output=jsonpath={.items[].metadata.name})
|
||||
```
|
||||
Show pod log:
|
||||
|
||||
|
|
Loading…
Reference in New Issue