You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
kubectl run -it loses some lines of the log #27264
When running a command via kubectl run -it that immediately prints something, we might lose some lines of the log due to a race of the execution of the container and the kubectl attach used by kubectl run to attach to the terminal (compare comment #16670 (comment)).
As a workaround for running an interactive shell we have this ugly Hit enter for command prompt now. The actual root problem though is that docker attach does not replay the logs. It looks like docker run is the only way to actually synchronously run a command, get all the output and attach to the process.
Reacted by Jonas Schneider, Jesse Dubay, Alexey Dubkov, Deiwin Sarjas, Segev Finer, Wyatt Fleming, Brendan Weibrecht, Marco Colli, Oleksii Kravchenko, Lucas Theisen and 5 more
FYI Hit enter for command prompt will be removed once #25273 is merged. That forces a refresh of the TTY. I suppose it may still be possible to lose some lines, but if you have something like e.g. a curses-based screen displayed, 25273 should make that display correctly once you attach.
Issues go stale after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Prevent issues from auto-closing with an /lifecycle frozen comment.
If this issue is safe to close now please do so with /close.
Send feedback to sig-testing, kubernetes/test-infra and/or @fejta.
/lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close.
Send feedback to sig-testing, kubernetes/test-infra and/or @fejta.
/lifecycle rotten
/remove-lifecycle stale
Activity
ncdc commentedon Jun 22, 2016
FYI
Hit enter for command promptwill be removed once #25273 is merged. That forces a refresh of the TTY. I suppose it may still be possible to lose some lines, but if you have something like e.g. a curses-based screen displayed, 25273 should make that display correctly once you attach.sttts commentedon Jun 23, 2016
For curses that's fine. I had in mind the scripting use-case, i.e.
That's currently not really possible due to the issue.
fejta-bot commentedon Dec 19, 2017
Issues go stale after 30d of inactivity.
Mark the issue as fresh with
/remove-lifecycle stale.Stale issues rot after an additional 30d of inactivity and eventually close.
Prevent issues from auto-closing with an
/lifecycle frozencomment.If this issue is safe to close now please do so with
/close.Send feedback to sig-testing, kubernetes/test-infra and/or
@fejta./lifecycle stale
fejta-bot commentedon Jan 18, 2018
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with
/remove-lifecycle rotten.Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with
/close.Send feedback to sig-testing, kubernetes/test-infra and/or
@fejta./lifecycle rotten
/remove-lifecycle stale
70 remaining items
esotsal commentedon Oct 24, 2024
/assign
esotsal commentedon Jan 21, 2025
Have some time now and will try to work on this, commenting here to avoid being set to stale lifecycle.
esotsal commentedon Oct 15, 2025
I wasn’t able to find a way. Unassigning my self to leave this to someone else if is interested to work with.
/unassign
segevfiner commentedon Oct 15, 2025
This is quite a fundamental issue with how interactive mode is implemented AFAIK.
The CLI first starts the container and then attaches to it, getting whatever is output from the point of attach on.
To fix this, the output will need to be buffered (Including possibly any out of band tty modes). Or the output paused until the first attach.
This will likely involve API changes, and possibly changes to CRI depending on the chosen implementation.
olamilekan000 commentedon Jan 3, 2026
/assign
fix(stepfunctions-tasks): state machine role is missing sagemaker:Add…
test: replace kubectl node-shell with exec into a host-exec DaemonSet
test: replace kubectl node-shell with exec into a host-exec DaemonSet
test: replace kubectl node-shell with exec into a host-exec DaemonSet