Skip to content

kubectl run -it loses some lines of the log #27264

@sttts

Description

@sttts

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.

Metadata

Metadata

Assignees

Labels

area/kubectlkind/bugCategorizes issue or PR as related to a bug.priority/backlogHigher priority than priority/awaiting-more-evidence.sig/cliCategorizes an issue or PR as relevant to SIG CLI.sig/nodeCategorizes an issue or PR as relevant to SIG Node.triage/acceptedIndicates an issue or PR is ready to be actively worked on.

Type

No type

Projects

Status

Backlog

Status

Triaged

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions