-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Have functional localhost proxy command, need to work more on deleting #396
Conversation
dcb1fe4
to
b20d20a
Compare
proxies if a service is deleted. Also still need to add tests.
b20d20a
to
486c8ec
Compare
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) |
There was a problem hiding this comment.
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.
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? |
This could also be extended for something like #347 |
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. |
Is there any way I can help to get this moving forward? |
Issues go stale after 90d of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
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