I have managed to deploy Asterisk to Google Container Engine (GKE) currently to the extent that a VoIP softphone can register. I'd now like to attach to Asterisk's container.
kubectl attach -it <pod-id>
however leads fast repetitions of Asterisk's CLI prompt (*CLI> *CLI> *CLI
...) without a chance for me to type in anything. It looks as if there is an endless cycle of attach/detach happening. How can I resolve this situation so that I can obtain clean access to the CLI (with a single *CLI>
prompt)?
UPDATE The same repetitions happen when to try to attach in two steps:
gcloud compute ssh <instance-id>
<instance># sudo docker attach <image-id>
The cycle of prompts is characteristic of a program which is reading from
/dev/null
in the belief that it's a tty. The Kubernetes documentation for thestdin
field inv1.Container
warns about it:By the way, the
-t
flag forkubectl attach
does not change whether the container has a tty or not. Except for error messages in some conditions, it's a no-op.It seems clear that, as
kubectl describe
is admitting to you, the asterisk container is being started withoutstdin
andtty
. There's no open bug for this. Unless there's a typo (or you're running rktnetes), you might consider opening one for this.