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

binding port-forwards to a non-localhost DNS fails #5043

Closed
nicks opened this issue Oct 14, 2021 · 1 comment · Fixed by #5245
Closed

binding port-forwards to a non-localhost DNS fails #5043

nicks opened this issue Oct 14, 2021 · 1 comment · Fixed by #5245
Assignees
Labels
bug Something isn't working

Comments

@nicks
Copy link
Member

nicks commented Oct 14, 2021

Start tilt like

tilt up --host dev.localhost --port=10450

if you have port forwards, you'll get an error:

Reconnecting... Error port-forwarding api (5734 -> 5000): error forwarding port: dev.localhost is not a valid IP

The error is coming from here:

https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#port-forward

Only accepts IP addresses or localhost as a value. When localhost is supplied, kubectl will try to bind on both 127.0.0.1 and ::1 and will fail if neither of these addresses are available to bind.

I don't totally understand why this restriction exists, or even if this is a bug. It seems like it would be trivial to resolve the DNS to an IP, so I am probably missing something. Needs further investigation.

@nicks nicks added the bug Something isn't working label Oct 14, 2021
@nicksieger nicksieger self-assigned this Dec 1, 2021
@nicksieger
Copy link
Member

It looks like the original proposal (kubernetes/kubernetes#43962) and implementation (kubernetes/kubernetes#46517) simply decided not to implement the extra DNS lookup. Looking into how we can convert the --host argument into an ip address at the point where we create the port forwards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants