kubernetes / website

Kubernetes website and documentation repo:

Home Page:https://kubernetes.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

novellat opened this issue · comments

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

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. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

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

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

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

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