kubectl exec ... /bin/bash eating control-p?

1/14/2020

If I run:

kubectl exec spi-tools-dev-3449236037-08pau -it -- /bin/bash

I get an interactive shell, but something is eating ^p characters. If I type one ^p, nothing happens. When I type a second ^p, two get sent. In bash, I go two items back in my history. In emacs, I go up two lines.

What's going on here? Something is obviously interpreting ^p as a command/escape character, but I don't see anything in the kubernetes docs that talks about that.

-- Roy Smith
escaping
kubernetes

1 Answer

1/15/2020

It looks like the answer is:

  1. Yes, this is kubectl's emulation of docker's ctrl-p/ctrl-q detach sequence.
  2. No, there's nothing you can do to change it.
  3. See this closed bug.

I'm running this under tmux, which in turn is under ssh. Each of which has their own in-band command signalling. It's amazing anything works at all :-)

-- Roy Smith
Source: StackOverflow