kubernetes / website

Kubernetes website and documentation repo:
https://kubernetes.io
Creative Commons Attribution 4.0 International
4.36k stars 14.09k forks source link

"kubectl attach" command hangs without providing interactive shell following "Share Process Namespace between Containers in a Pod" task #46478

Open novellat opened 1 month ago

novellat commented 1 month ago

attaching doesn't work - when i run kubectl attach -it nginx -c shell I get

If you don't see a command prompt, try pressing enter.

and pressing enter doens't help

k8s-ci-robot commented 1 month ago

This issue is currently awaiting triage.

SIG Docs takes a lead on issue triage for this website, but any Kubernetes member can accept issues by applying the triage/accepted label.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
novellat commented 1 month ago

what works though is kubectl exec -it nginx -c shell -- /bin/sh

dipesh-rawat commented 1 month ago

Page reported in issue (based on issue title): https://kubernetes.io/docs/tasks/configure-pod-container/share-process-namespace/ /language en

dipesh-rawat commented 1 month ago

/retitle "kubectl attach" command hangs without providing interactive shell following "Share Process Namespace between Containers in a Pod" task

Aaina26 commented 1 month ago

I ran these commands on k8s v1.29 cluster kubectl attach -it nginx -c shell command does give the following output. I think it needs to be changed in the documentation image

The suggested command kubectl exec -it nginx -c shell -- /bin/sh works fine Screenshot from 2024-05-28 15-31-06