Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use localhost + random ports as an alternative #68

Closed
morningspace opened this issue Jul 9, 2019 · 4 comments
Closed

Use localhost + random ports as an alternative #68

morningspace opened this issue Jul 9, 2019 · 4 comments

Comments

@morningspace
Copy link

morningspace commented Jul 9, 2019

To add local DNS lookup in hosts is convenient, kind of the core idea of this great tool, but I wonder if that makes sense to have it support localhost with random ports by specifying an additional command line option, just like the usual way that Docker does to expose container ports using its -P.

With that, we don't have to modify hosts, create loopback alias, etc., hence do not need sudo any more. I'm not going to break the original design, just to give people another option, to make it more widely used.

Does it make sense?

@cjimti
Copy link
Member

cjimti commented Jul 9, 2019

I believe you could accomplish that with a shell script and kubectl port-forward. Since you don't need to bind to multiple interfaces or have name resolution kubefwd may be overkill IMO.

@morningspace
Copy link
Author

morningspace commented Jul 10, 2019

Aha... I was thinking that even w/o multi-interface binding and name resolution, it might still be reasonable to leverage other features in kubefwd, e.g. allows to specify namespace, selector, context, kubeconfig, etc. So, an additional argument, say mode=fixed|random, could support both.

But maybe you are right... I haven't thought about that on the other side... To use kubectl w/ shell script or kubernetes client-go may also be feasible... just not sure how much things overkilled...I will explore it. Thanks for your reply!

@cjimti
Copy link
Member

cjimti commented Aug 3, 2019

@morningspace im going to close this. I think a new project forked from kubefwd might be a great way to experiment with this use case. Thanks for the input!

@cjimti cjimti closed this as completed Aug 3, 2019
@morningspace
Copy link
Author

Sure... @cjimti thanks for your time on this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants