Kubernetes - kubectl exec bash - shorten session and line width

I have a k8s cluster with 3 minions, master and haproxy in front. When i use

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

      

to access bash in the pod (in this case, it's the only container). I get and after something like 5 minutes I log out of the terminal. If I go back to the container, I can see my old bash process, with new one running for my new connection. Is there a way to prevent this? When I use docker exec it works fine and doesn't throw me away, so I think it's from Kubernetes.

As a bonus question - is there a way to increase the number of characters per line when using kubectl exec? I am getting truncated output other than docker exec.

Thanks in advance!

+3


source to share


2 answers


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



The kubelet webserver is down.

+3


source


I have a solution by adding env COLUMNS=$COLUMNS LINES=$LINES

before bashkubectl exec -ti busybox env COLUMNS=$COLUMNS LINES=$LINES bash



0


source







All Articles