Skip to content

Bug : Fix broken jsonpath in kubectl logs verification command #297

@shubhtrek

Description

@shubhtrek

Problem

The following command is incorrect:

kubectl logs -n kmesh-system $(kubectl get pods -n kmesh-system -o jsonpath='{.items.metadata.name}')

The jsonpath expression {.items.metadata.name} is invalid and returns no pod name, causing the command to fail silently.

Fix

Option A (first pod):
kubectl logs -n kmesh-system $(kubectl get pods -n kmesh-system -o jsonpath='{.items[0].metadata.name}')

Option B (recommended):
kubectl logs -n kmesh-system -l app=kmesh

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions