I am trying to use VS Code to debug kubernetes pod in python. I have successfully debug one pod with Kuberentes: Debug (Attach) command. However, when I tried to debug another pod with the same command, I got error:
[E1105 11:54:06.281402 25535 portforward.go:400] an error occurred forwarding 10000 -> 5678: error forwarding port 5678 tp pod
The same port forwarding works fine for the first pod. Only when I try to attach another port, I got the error. Before I tried to attach the second pod, I have disattached the first pod already.
I suspect that the port is still being used by the first pod so the second pod could not be forwarded.
Does anyone know how to change the port number in vscode and how to fix this problem?
Thanks