-
Notifications
You must be signed in to change notification settings - Fork 40.9k
feat(kubectl): print the logs from given log sream #128159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Skipping CI for Draft Pull Request. |
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Changelog suggestion -With the `SplitStdoutAndStderror` feature gate enabled in both kube-apiserver and kubelet, users can now print the logs for a container from a given log stream using `kubectl logs --stream=stdout|stderr`.
+Added kubectl support for fetching a specific log stream (stdout or stderr). Example: `kubectl logs pods/<pod> --stream=stdout`.
+You need to connect to a cluster where the `SplitStdoutAndStderror` feature gate is enabled in order to use this kubectl feature. |
Thank you @sftim! I have updated the release note. |
/hold cancel |
016798a
to
54c230b
Compare
54c230b
to
8b2f6fa
Compare
test/e2e/kubectl/logs.go
Outdated
@@ -357,4 +358,31 @@ var _ = SIGDescribe("Kubectl logs", func() { | |||
}) | |||
}) | |||
|
|||
ginkgo.Describe("specific log stream", feature.PodLogsQuerySplitStreams, func() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How are you testing this feature?
I think this feature should be off by default. Do you have any test-infra changes to enable this gate for this test?
8b2f6fa
to
8b78770
Compare
bump @knight42 You able to see this through for 1.33? |
/test pull-kubernetes-e2e-kind-alpha-features |
8b78770
to
7cc2ee3
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: knight42 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: Jian Zeng <[email protected]>
Signed-off-by: Jian Zeng <[email protected]>
7cc2ee3
to
936f598
Compare
/test pull-kubernetes-e2e-kind-alpha-features |
/test pull-kubernetes-unit @kannon92 Hi, I could really use some help here. I am unsure which pre-submit test runs the tests with the |
/test |
@kannon92: The
The following commands are available to trigger optional jobs:
Use
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/test pull-kubernetes-node-e2e-containerd-alpha-features |
@ardaguclu could you review the CLI code? |
I triggered a few alpha jobs for sig-node. If they are not there, then you may need to create a job for it. I don't know how cli tests are run in kube. |
@knight42: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
The test failures above are unrelated, and the newly introduced tests are still being skipped 🤔. |
sad.. We missed this for this release cycle. Please post on #sig-cli so we can get reviews for the next cycle. |
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Depends on #127360.
Complete the changes on the kubectl side to support the new functionality.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: