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

port-forwards should not allocate system ports #5590

Closed
briandealwis opened this issue Mar 22, 2021 · 1 comment · Fixed by #5670
Closed

port-forwards should not allocate system ports #5590

briandealwis opened this issue Mar 22, 2021 · 1 comment · Fixed by #5670
Assignees
Milestone

Comments

@briandealwis
Copy link
Member

briandealwis commented Mar 22, 2021

Our port-forwarding handling for services requests the same local port as the service port:

On Windows systems, where system ports can be allocated by ordinary processes, this means that a service can allocate ports 80 or 443 which is generally not desirable. This issue is not normally seen on *nix systems as allocating system ports require running as root.

This can lead to puzzling behaviour as Skaffold's port-forwards listen only on localhost, which allows co-existing with another process that listens on IP_ADDRANY on the same port (such as the k8s cluster's ingress port!).

As a workaround, users can set up explicit port-forwards for the corresponding services.

Information

  • Operating system: Windows

Steps to reproduce the behavior

  1. Alter Skaffold's example/typescript's k8s/deployment.yaml to use port 80
  2. skaffold dev --port-forward
  3. See Skaffold port-forward to port 80
@alisters
Copy link

Thanks for raising this and the speedy change. This, along with the helm debugging support you've added over time will bring us close to "git pull, skaffold run" across a set of disparate enterprise services and charts. Much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment