尝试使用Remote Connection在VSCode中进行开发并运行/debug/...在kubernetes集群上的pod中。
如何使用kubectl连接VScode?
正在尝试端口转发
kubectl -n dev port-forward my-pod-name 22:22它连接起来,工作正常,但得到了错误:
E0604 10:58:15.025638 11216 portforward.go:385] error copying from local connection
to remote stream: read tcp4 127.0.0.1:22->127.0.0.1:54495: wsarecv: An existing
connection was forcibly closed by the remote host.发布于 2019-06-06 00:08:56
端口22是系统中保留的专用端口,这就是无法建立连接的原因。使用以下代码片段:
kubectl -n dev port-forward my-pod-name 8022:22https://stackoverflow.com/questions/56442095
复制相似问题