Skip to content

Exclude name-XXX-YY #143

Answered by superbrothers
patsevanton asked this question in Q&A
Jul 16, 2021 · 4 comments · 3 replies
Discussion options

You must be logged in to vote

stern provides three exclusion ways, as follows

$ stern -h | grep -- --exclude
  -e, --exclude strings            Log lines to exclude. (regular expression)
  -E, --exclude-container string   Container name to exclude when multiple containers in pod. (regular expression)
      --exclude-pod string         Pod name to exclude. (regular expression)

$ stern --version
version: 1.20.0
commit: 0f9402d4c7c11f343dab140e7461817e21f3a9e8
built at: 2021-08-13T01:32:22Z

--exclude is for log messages. If you want to target pod names, you can use --exclude-pod.

$ stern --exclude-pod js-agent-mongodb .

Replies: 4 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@patsevanton
Comment options

Answer selected by patsevanton
Comment options

You must be logged in to vote
2 replies
@superbrothers
Comment options

@floryut
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants