aylei / kubectl-debug

This repository is no longer maintained, please checkout https://github.com/JamesTGrant/kubectl-debug.
Apache License 2.0
2.3k stars 302 forks source link

在 debug-agent-pod 中如何读写目标 pod 的文件? #101

Open gnatecheng opened 4 years ago

gnatecheng commented 4 years ago

在 debug-agent-pod 中有可能读写目标 pod 的文件吗?如 配置文件 或 日志文件。 另外在 debug 过程中如何 exec debug-agent-pod ? 试过,sh, /bin/sh, /usr/bin/sh 都报类似的错误提示: OCI runtime exec failed: exec failed: container_linux.go:349: starting container process caused "exec: \"/bin/sh\": stat /bin/sh: no such file or directory": unknown

ffxgamer commented 4 years ago

目标pod的文件在 /proc/1/root 下面