Skip to content

Support filtering by the node name #242

@tksm

Description

@tksm

What would you like to be added:

I would like to add a flag --node that filters pods by the node name. This flag will be helpful when we debug pods on the specific node.

# Print a DaemonSet pod on the specific node
stern --node <NODE_NAME> daemonsets/<DS_NAME>

# Print all pods on the specific node
stern --node <NODE_NAME> --no-follow --max-log-requests 1 .

Why is this needed:

We can select pods on the specific node by --field-selector spec.nodeName=<NODE_NAME> too, but having a dedicated flag allows us to implement a completion for node names.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions