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

fix: handle colima host #1228

Merged
merged 1 commit into from
Mar 9, 2023
Merged

fix: handle colima host #1228

merged 1 commit into from
Mar 9, 2023

Conversation

thejan2009
Copy link
Contributor

k3d mostly works flawlessly on github.com/abiosoft/colima, but host.k3d.interal points to nowhere useful. We detect colima runtime by the name in docker info output, then resolve the host IP by querying host.lima.internal.

How to test:

$ colima start
$ k3d cluster create
$ nc -l 0.0.0.0 1234

In another terminal

$ kubectl run -it --rm --image alpine:latest test -- /bin/sh -c 'echo "hello there" | nc host.k3d.internal 1234'

What

Fixes HostIP detection when running on Colima.

Why

To fix host.k3d.internal

Implications

Unsure. Works on my machine with the patch...

k3d mostly works flawlessly on github.com/abiosoft/colima, but
host.k3d.interal points to nowhere useful. We detect colima runtime by
the name in docker info output, then resolve the host IP by querying
host.lima.internal.

How to test:

$ colima start
$ k3d cluster create
$ nc -l 0.0.0.0 1234

In another terminal

$ kubectl run -it --rm --image alpine:latest test -- \
/bin/sh -c 'echo "hello there" | nc host.k3d.internal 1234'
@iwilltry42
Copy link
Member

That's a nice addition, thank you @thejan2009 ! 👍

@iwilltry42 iwilltry42 merged commit 3386725 into k3d-io:main Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants