kubernetes-sigs / kind

Kubernetes IN Docker - local clusters for testing Kubernetes
https://kind.sigs.k8s.io/
Apache License 2.0
13.02k stars 1.51k forks source link

add flag for env: KIND_EXPERIMENTAL_DOCKER_NETWORK #3580

Closed alpha-baby closed 2 months ago

alpha-baby commented 2 months ago

What would you like to be added:

My requirement is that I need the kind container launched by the kind cmd tool to communicate with other docker containers I use, but I found no configuration in the kind cmd tool to set the network for the kind container, until I studied the kind source code. I discovered an environment variable: KIND_EXPERIMENTAL_DOCKER_NETWORK, which fits my needs perfectly. However, I found that the KIND_EXPERIMENTAL_DOCKER_NETWORK was not mentioned in the kind documentation until I looked into the source code.

Why is this needed:

So, could we directly add a flag to the kind cmd tool to configure the network for kind containers? Then we could simply use kind create cluster --help to finish the network configuration for the kind container. If possible, I would be happy to submit a PR to implement this feature.

aojea commented 2 months ago

There are several reasons we try to avoid that, but mainly two reasons, it will increase the surface area we'll have to maintain and there is no consistency on the networking on the different implementations (docker uses libnetwork, podman cni and netavark and nerctl cni)

Thanks