derailed / k9s

🐶 Kubernetes CLI To Manage Your Clusters In Style!
https://k9scli.io
Apache License 2.0
27.26k stars 1.71k forks source link

k9s loses colors when exiting a pod's shell under GNU Screen #650

Open JosefAssad opened 4 years ago

JosefAssad commented 4 years ago




Describe the bug k9s is normally cheerfully colorful. If I run k9s under GNU Screen and enter the shell of a container and then exit it with ctrl-d, when I am returned to k9s it is in what appears to be greyscale.

I can reproduce this behavior under mate-terminal as well as urxvt, in both cases inside a GNU Screen session. Outside of a GNU Screen session I cannot reproduce this issue.

To Reproduce Steps to reproduce the behavior (assuming k3s is started vanilla, we haven't created any resources yet):

  1. Start a GNU Screen session: screen
  2. Start k9s, pointing it at the k3s config: sudo k9s --kubeconfig=/etc/rancher/k3s/k3s.yaml
  3. Hit "Enter" on the node k3s
  4. Hit "Enter" on any pod (apparently)
  5. Hit "s" to request a shell for any container in the pod

Expected behavior When the shell exits - whether because the container's shell exited immediately or you hit ctrl-d to exit - we land again in k9s and it is as cheerfully colorful as ever

Actual behavior When the shell exits - whether because the container's shell exited immediately or you hit ctrl-d to exit - we land again in k9s but it is an alternate universe where k9s suffers from depression and has forgotten to present its beautiful colors to the world. In this nightmare dimension, k9s knows only greyscale. We are in a parallel universe where k9s is a goth. All hope is lost.

Screenshots Before asking for shell:

happy

After exiting from shell:

sad

Versions (please complete the following information):

tyriis commented 4 years ago

I have the same behaviour. I am using https://github.com/thestinger/termite terminal.