I am using this command to remote debugging my kubernetes(v1.15.2) pod:
kubectl port-forward soa-room-service-65986bddb4-6cz76 5011:5011
but when I connect the debugging port using my Intellij Idea,it shows:
Forwarding from 127.0.0.1:5011 -> 5011
Forwarding from [::1]:5011 -> 5011
Handling connection for 5011
E0314 15:50:53.351183 41712 portforward.go:400] an error occurred forwarding 5011 -> 5011: error forwarding port 5011 to pod 2d40e44288507f65a256ed7c591658cd1f5caf7f268feb34afda01be480de6c8, uid : unable to do port forwarding: socat not found.
Handling connection for 5011
E0314 15:51:19.031476 41712 portforward.go:400] an error occurred forwarding 5011 -> 5011: error forwarding port 5011 to pod 2d40e44288507f65a256ed7c591658cd1f5caf7f268feb34afda01be480de6c8, uid : unable to do port forwarding: socat not found.
I search from internet and try to install socat in my local Mac OS Catalina:
brew install socat
$ socat -h
socat by Gerhard Rieger and contributors - see www.dest-unreach.org
Usage:
socat [options] <bi-address> <bi-address>
options:
-V print version and feature information to stdout, and exit
and also install socat in remote server's pod:
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime \
&& echo $TZ > /etc/timezone \
&& apk add --no-cache curl socat
when I debug,the error still remain,what should I do to fix this problem and enable by kubernetes pod remote debugging? Am I missing something?
It says socat isn't installed.Install socat on the host machines of the kubernetes nodes should resolve the problem.