kubernetes-client
kubernetes-client copied to clipboard
local address argument to override localhost in portForward API
Hi, I see currently that the API for port forwarding does not support passing as an argument local address (as possible in kubectl command: https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#port-forward), but only container port and local port, so it will always default to localhost address.
Is there a way to achieve override to localhost with my address with current API ?
and if not, is it possible to add support for it?
Thanks!
https://github.com/fabric8io/kubernetes-client/issues/3234
@MatanLevy : Hello, I remember while investigating #3234 I had added an additional method to PortForwardable interface. I've created a draft PR for this https://github.com/fabric8io/kubernetes-client/pull/3730
Would it be possible for you to review/try it out by building SNAPSHOT based on my branch and provide feedback on whether it's working for your use case?
I think the local address can be provided like this:
https://github.com/fabric8io/kubernetes-client/blob/8ebcd808a4294894d09b3fe0499271a2d5c66bec/kubernetes-examples/src/main/java/io/fabric8/kubernetes/examples/PortForwardExample.java#L56-L57
Shall we close this issue?
This issue has been automatically marked as stale because it has not had any activity since 90 days. It will be closed if no further activity occurs within 7 days. Thank you for your contributions!