thecasualcoder / kube-fzf

Shell commands using kubectl and fzf for command-line fuzzy searching of Kubernetes Pods.
MIT License
199 stars 33 forks source link

execpod default command bash #10

Closed Aracki closed 5 years ago

Aracki commented 5 years ago

Is it possible to make execpod's default command to be bash.

I know there will be no bash in some containers, buy maybe if that fails we can do sh.

arunvelsriram commented 5 years ago

I would prefer sh as we can blindly assume that all containers will have sh.

Am not sure how to find out if a container has bash. If you could think of a way to check if a container has bash upfront please raise a PR.

arunvelsriram commented 5 years ago

Closing this for now. Feel free to share your thoughts.

Aracki commented 5 years ago

Didn't find a way, without actually exec-ing into the container.

The only way I can think of is to try to exec with bash and if there is an error, fire up another command with sh.