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

Support port-forward address bind with skaffold dev #1358

Closed
matti opened this issue Dec 3, 2018 · 8 comments · Fixed by #3040
Closed

Support port-forward address bind with skaffold dev #1358

matti opened this issue Dec 3, 2018 · 8 comments · Fixed by #3040
Labels
area/dev area/portforward kind/feature-request priority/awaiting-more-evidence Lowest Priority. May be useful, but there is not yet enough supporting evidence.

Comments

@matti
Copy link
Contributor

matti commented Dec 3, 2018

In Kubernetes 1.13

kubernetes/kubernetes#46517

Adds --address flag to port-forward command that allows listening on addresses other then localhost, so that port-forward can ie. be opened to consumers other then residing in local host like running in docker or different machine/vm

usecase: run skaffold dev in google cloud shell (needs 0.0.0.0 binding)

@matti
Copy link
Contributor Author

matti commented Dec 3, 2018

well google cloud shell + skaffold won't work currently anyway because of kubernetes/minikube#3392

@tjerkw
Copy link

tjerkw commented Mar 8, 2019

Yeah i need this too, callbacks to the running kubernetes in dev mode are not working from outside services (like payment callbacks). I fix it now by manually also running "kubectl port-forward --address 0.0.0.0"

@javdl
Copy link

javdl commented May 10, 2019

@matti You can use a remote cluster to deploy, also your container builds can run in a remote cluster or Google Cloud build. No need to run anything in Cloud Shell as far as I can see...? Also, you would not want to run Minikube in Cloud Shell, it is not made for that. Think about the performance... If it would even start up at all.

@matti
Copy link
Contributor Author

matti commented May 10, 2019

@joostvanderlaan yes I could, but I has training/classroom scenarios in mind

@demisx
Copy link
Contributor

demisx commented Jun 21, 2019

We need this as well, because current port forwarding (v0.31) opens up forwarded port on 127.0.0.1 (localhost) address only and we need it to be on all, so services outside localhost can still connect to the exposed port.

My current workaround in "Docker for Desktop (Mac)" is to define port type as "LoadBalancer":

...
type: LoadBalancer
ports:
  - port: 3000
    targetPort: 3000

@dgageot dgageot added area/dev and removed cmd/dev labels Jul 11, 2019
@prokher
Copy link

prokher commented Jul 29, 2019

@demisx I just wanted to say thank you. Indeed, saying that service must be load balanced (with type: LoadBalancer) makes Skaffold bind it to 0.0.0.0, which helped me to run skaffold dev --port-forward from inside Docker container we use for development.

@tejal29
Copy link
Contributor

tejal29 commented Aug 26, 2019

@priyawadhwa is this implemented?

@tejal29 tejal29 added the priority/awaiting-more-evidence Lowest Priority. May be useful, but there is not yet enough supporting evidence. label Aug 26, 2019
@priyawadhwa
Copy link
Contributor

Nope, we don't have support for changing the listening address right now. It could be added to the portForward section of the skaffold config, and then passed in to kubectl port-forward in the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dev area/portforward kind/feature-request priority/awaiting-more-evidence Lowest Priority. May be useful, but there is not yet enough supporting evidence.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants