尝试使用远程连接在 VSCode 中进行开发,并在 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.