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

Have functional localhost proxy command, need to work more on deleting #396

Closed

Conversation

aaron-prindle
Copy link
Contributor

@aaron-prindle aaron-prindle commented Jul 26, 2016

proxies if a service is deleted. Also still need to add tests.

This is done by adding a Watch to all k8s services and then creating a proxy from the localhost:port to the VM-ip:port.
#38

@aaron-prindle aaron-prindle force-pushed the localhost-port-proxy branch 2 times, most recently from dcb1fe4 to b20d20a Compare July 26, 2016 01:12
proxies if a service is deleted.  Also still need to add tests.
nodePort := 0
if len(svc.Spec.Ports) > 0 {
nodePort = int(svc.Spec.Ports[0].NodePort)
}
if nodePort == 0 {
return 0, fmt.Errorf("Service %s does not have a node port. To have one assigned automatically, the service type must be NodePort or LoadBalancer, but this service is of type %s.", service, svc.Spec.Type)
return 0, fmt.Errorf("Service does not have a node port. To have one assigned automatically, the service type must be NodePort or LoadBalancer, but this service is of type %s.", svc.Spec.Type)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer to output the service name still, svc.ObjectMeta.Name iirc.

@jimmidyson
Copy link
Member

I'm not 100% sold on the usefulness of proxying the service node port. It's too difficult to discover compared to the actual service port(s), i.e. kubectl doesn't output the node port. The problems with using the actual service port are unable to bind to privileged ports & port conflicts (multiple services can use same port thanks to each service having it's own IP).

How do you expect a user to use this?

@dlorenc
Copy link
Contributor

dlorenc commented Jul 26, 2016

I think this was meant more as a proof of concept. I agree it's minor, but exposing things on localhost is a minor usability win over the VM-specific IP. It's come up a few times in issues, but maybe I misunderstood the use cases:

#38
#198

and in the Docker for Mac issue: #99

@dlorenc
Copy link
Contributor

dlorenc commented Jul 26, 2016

This could also be extended for something like #347

@jimmidyson
Copy link
Member

Yeah agree that perhaps it is a slight UX improvement, although I'm unsure how you'd handle port conflicts (something on host already using specified node port). I have no idea about how we can improve this to act like an internal VPN across OSes - seems possible on OS X via hyperkit, but would prefer a consistent UX across OSes.

@rubenv
Copy link

rubenv commented Jul 24, 2017

Is there any way I can help to get this moving forward?

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 24, 2017
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or @fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 1, 2018
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten
/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jan 31, 2018
@fejta-bot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants