kubectl-debug
kubectl-debug copied to clipboard
debug command fail
kubectl debug gateway-0 -n testing
error execute remote, error sending request: Post http://172.18.45.169:10027/api/v1/debug?command=%5B%22bash%22%5D&container=docker%3A%2F%2F400076b42616a628173867c4de002eb38e31ba645b5a08183610ce40b7bd4f5e&image=nicolaka%2Fnetshoot%3Alatest: unexpected EOF
error: error sending request: Post http://172.18.45.169:10027/api/v1/debug?command=%5B%22bash%22%5D&container=docker%3A%2F%2F400076b42616a628173867c4de002eb38e31ba645b5a08183610ce40b7bd4f5e&image=nicolaka%2Fnetshoot%3Alatest: unexpected EOF
集群是阿里云容器服务托管的k8s集群
没有安装debug-agent吧
装了, 而且不是说不装也可以吗
You'd better check the connectivity of the debug agent address:port, which supplies 172.168.45.169:10027 above.
charlie [email protected] 于2020年4月26日周日 上午10:22写道:
装了, 而且不是说不装也可以吗
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/aylei/kubectl-debug/issues/98#issuecomment-619469304, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGITFQO2J7NAS5TAUN3VKKLROOLGPANCNFSM4MNFBGIA .
The same wrong:error execute remote, error sending request: Post http://****:10027/api/v1/debug?command=......&image=nicolaka%2Fnetshoot%3Alatest: dial tcp ****:10027: connect: connection refused
@fralychen @thetruechar What's the output of kubectl debug --version? It should have created the debug agent automatically on launch in after v1.0.1
@aylei @thetruechar It's fine for:
kubectl-debug --agentless --port-forward myapp -n default
brew install 7 days ago.
❯ kubectl debug --version
debug version v0.0.0-master+$Format:%h$
brew install aylei/tap/kubectl-debug
Updating Homebrew...
^CWarning: aylei/tap/kubectl-debug 0.1.1 is already installed and up-to-date
[root@localhost ~]# kubectl-debug --version debug version v0.0.0-master+$Format:%h$
@fralychen @thetruechar
It turns out that v0.1.1 does have --agentless and --port-forward by default, so you must command --agentless explicitly if the agent is not installed in advance and command --port-forward explicitly if the 10027 port of the target node is not directly accessible.
An alternative is to configure the default value of these options in a local configuration file https://github.com/aylei/kubectl-debug#configuration, or you can upgrade to v0.2.0-rc via brew upgrade aylei/tap/kubectl-debug.
Thanks