embedshim
embedshim copied to clipboard
When the command does not exist, `kubectl exec` hangs.
Background
When bash is absent, containers managed by `embedshim experience a hang, as illustrated by the following command:
[root@master1 ~]# kubectl -it exec xxx-bqwbh -n manager -- bash
Defaulted container "xxx" out of: xxx, init-rights (init)
Under normal circumstances, the output is as follows:
[root@master1 ~]# kubectl -it exec xxx-h4vvp -n manager -- bash
Defaulted container "xxx" out of: xxx, permission-change (init),
error: Internal error occurred: error executing command in container: failed to exec in container: failed to start exec "54071ac1a5e33002e26bd979bb5f94d8ba6072f0cf125966e721b0ddf2129889": OCI runtime exec failed: exec failed: unable to start container process: exec: "bash": executable file not found in $PATH: unknown