9il*_*0lo 3 windows shell kubectl
根据https://kubernetes.io/docs/tasks/debug-application-cluster/get-shell-running-container/ 中的说明,我正在尝试使用 Kubectl 登录正在运行的容器,但我失败了:
kubectl exec -it mycontainer -- /bin/bash
Run Code Online (Sandbox Code Playgroud)
无法使用 TTY - 输入不是终端或正确类型的文件 rpc 错误:代码 = 2 desc = oci 运行时错误:exec 失败:container_linux.go:247:启动容器进程导致“exec:\”D:/ Applications/Git/usr/bin/bash\": stat D:/Applications/Git/usr/bin/bash: no such file or directory"
命令以退出代码 126 终止
看起来 kubectl 试图在我的机器上执行 bash,这完全不是我想要实现的。
我可以执行没有空格的命令:
$ kubectl exec mycontainer 'ls'
lib
start.sh
Run Code Online (Sandbox Code Playgroud)
但没有:
$ kubectl exec mycontainer 'ls .'
rpc error: code = 2 desc = oci runtime error: exec failed: container_linux.go:247: starting container process caused "exec: \"ls .\": executable file not found in $PATH"
command terminated with exit code 126
Run Code Online (Sandbox Code Playgroud)
我做错了什么?
我已经在 mingw git shell 中尝试过,就像普通的 Windows 控制台一样。
| 归档时间: |
|
| 查看次数: |
6272 次 |
| 最近记录: |