Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kubernetes - kubectl exec bash - session drop and line width

I'm having k8s cluster with 3 minions, master and haproxy in front. When I use

kubectl exec -p $POD -i -t -- bash -il

for accessing bash in the pod (it is a single container in this case) I get in and after something like 5 mins I get dropped out of the terminal. If I reenter the container I can see my old bash process running, with a new started for my new connection. Is there a way to prevent this from happening? When I'm using docker exec it works fine and doesn't drop me so I guess it is from kubernetes.

As a bonus question - is there a way to increase the characters per line when using kubectl exec? I get truncated output that is different from docker exec.

Thanks in advance!

like image 758
plamer Avatar asked Jun 15 '15 09:06

plamer


1 Answers

It is a known issue - https://github.com/kubernetes/kubernetes/issues/9180

The kubelet webserver times out.

like image 198
plamer Avatar answered Oct 21 '22 14:10

plamer