Closed osintalex closed 1 year ago
Could you try changing port from 28688 to a smaller number?
Yep will try, thanks for the suggestion! How though - I can't see a flag for that on ktunnel inject
?
EDIT: just checked out the source code and realised I missed the global port flag, will try this with ktunnel inject deployment <my deployment> -n <my namespace> 4321 --port <port value>
Same error unfortunately:
E0331 13:31:49.603261 81647 portforward.go:400] an error occurred forwarding 4200 -> 4200: error forwarding port
4200 to pod <pod hash>, uid : failed to execute portforward in network namespace "/var/run/netns/cni-<network id>":
failed to connect to localhost:4200 inside namespace "<pod hash>", IPv4: dial tcp4 127.0.0.1:4200: connect: connection
refused IPv6 dial tcp6 [::1]:4200: connect: cannot assign requested address
Hmm, I also just tested this on a different deployment in my cluster and it worked fine. I suspect it may therefore be to do with devspace - one one of them I'm running with devspace dev
and the other I've just run with devspace deploy
.
which one was working? dev or deploy?
Deploy worked fine but I couldn't get dev to work with ktunnel inject
.
@osintalex it seems that dev mode supports reverse port-forwarding (which is actually pretty cool) why would you need to use ktunnel in that case?
Oh nice! I didn't know it could do that. So I probably don't need to use ktunnel
in that case. Thanks!
I'm trying to inject to a deployment in line with the Pycharm debugger example but getting these errors:
ktunnel inject deployment <my deployment> -n <my namespace> 4321
is the command and this is the output, redacted in places.I can port forward fine with
kubectl
and no error logs on the pod. Wondering if it's because it's trying to assign an Ipv6 address rather than ipv4?