aylei / kubectl-debug

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

error execute remote #119

Open ZuoGuocai opened 4 years ago

ZuoGuocai commented 4 years ago

I execute the tool like this, but failed. The errors in the below:

# kubectl debug   getrealip-55f58f7b57-hj4rs   -n devops
error execute remote, error sending request: Post http://172.24.126.117:10027/api/v1/debug?command=%5B%22bash%22%5D&container=docker%3A%2F%2Fafec33ee3669bc195dacea32a7fa9284d5c21367d92d36602b9d55fa1913a07e&image=nicolaka%2Fnetshoot%3Alatest: dial tcp 172.24.126.117:10027: connect: connection refused
error: error sending request: Post http://172.24.126.117:10027/api/v1/debug?command=%5B%22bash%22%5D&container=docker%3A%2F%2Fafec33ee3669bc195dacea32a7fa9284d5c21367d92d36602b9d55fa1913a07e&image=nicolaka%2Fnetshoot%3Alatest: dial tcp 172.24.126.117:10027: connect: connection refused
yestab123 commented 4 years ago

If you use DaemonSet mode, try to add hostNetwork: true in DaemonSet config file

like

      dnsPolicy: ClusterFirst
      hostNetwork: true
      hostPID: true
      restartPolicy: Always