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

[FEATURE] Support custom options for docker network #165

Closed
lsoica opened this issue Jan 15, 2020 · 7 comments
Closed

[FEATURE] Support custom options for docker network #165

lsoica opened this issue Jan 15, 2020 · 7 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@lsoica
Copy link

lsoica commented Jan 15, 2020

Scope of your request

Add the ability to provide custom options for docker network create.

As k3d creates its own docker network, the network uses default MTU (1500).
In some environments, like OpenStack, configured with VxLAN, the host is already configured with a lower MTU (1450) so we need a way to provide a custom MTU for the docker network.

Describe the solution you'd like

An extra option for k3d create, like:
k3d create --docker-network-opt "com.docker.network.driver.mtu=1450" --docker-network-opt another-value

@lsoica lsoica added the enhancement New feature or request label Jan 15, 2020
@iwilltry42 iwilltry42 added the good first issue Good for newcomers label Jan 16, 2020
@iwilltry42
Copy link
Member

Hi there, thanks for this issue 👍
We're currently working on a --network flag which skips the creation of a new cluster network and just attaches the containers to an existing network. Would that be sufficient?

@lsoica
Copy link
Author

lsoica commented Apr 11, 2020

Hi,

Yes, thanks, works for my use case.

@iwilltry42
Copy link
Member

Great, closing in favor of #220

@AntonOfTheWoods
Copy link

Hi @iwilltry42 , it doesn't really work for my usecase... is there no way to tell k3d docker to create a different mtu size? Is the only way to create my own pre-existing network?

@iwilltry42
Copy link
Member

Hey @AntonOfTheWoods unfortunately it would be really cumbersome to expose all possible options for docker network creation via k3d. We're currently only exposing the choice of a subnet to use.
For all the rest, it's just way more flexible to do docker network create [OPTIONS] NAME and then do k3d cluster create --network NAME.
May I ask what usecase this doesn't work for for you?

@AntonOfTheWoods
Copy link

@iwilltry42 genuine brainfart, sorry. I have some generic scripts and didn't want it to be specific to docker (vs podman) but that was just being dumb. It is actually fine.

I did notice that if you create using the name it would have created anyway, it will use it without you explicitly specifying it (with a warning). That tripped me up because for some reason when I was deleting the cluster it, wasn't deleting the automatically created network. As such my if not network_exists wasn't creating a new mtu-ed network.

I guess it is pretty obvious what is happening after a couple of minutes though, so probably not worth adding to the docs. Thanks again, k3d is truly the most awesome way to develop stuff for kube!

@iwilltry42
Copy link
Member

Great, thanks for the feedback! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants