shell script is stop after SSH (logged into kubernetes pod)

9/12/2019

Here my shell script in my host.

#!/bin/bash
loginCommend="kubectl -n my-namespace exec -it my-demo-app-58df8dc87-568gb /bin/bash"
eval "$loginCommend"
ls -la

My shell script is stop after eval "$loginCommend".

Which mean shell script is stop after changing/ssh to another host, I think. I would like to do continuous running ls -la.

-- Zaw Than oo
bash
kubernetes
linux
shell

0 Answers