Closed Ghost-Cavendish closed 5 months ago
kind depends on the backend docker/podman/nerdctl to handle the low level details, if you are more explicit about the exact problems we can try to help, but is not clear from the description what is the problem
kind depends on the backend docker/podman/nerdctl to handle the low level details, if you are more explicit about the exact problems we can try to help, but is not clear from the description what is the problem
It is to configure a static IP for the k8s node created by kind, that is, how to make the docker container IP created by the kind command static, just like the docker-compose configuration in the following figure.
why do you need a static ip?
why do you need a static ip?为什么需要静态IP?
I want to use a custom CNI network plugin, and I need to add a route to the container, otherwise the K8S multi-node pods cannot communicate with each other
need to add a route to the container IP, so you need the container IP to be a static IP
You shouldn't need a static IP for pods within the same cluster to communicate with each other. That is one of the the things the CNI should take care of for you.
I've presented in kubecon about this topic https://github.com/aojea/kind-networking-plugins , about using kind for advanced networking scenarios
You shouldn't need a static IP for pods within the same cluster to communicate with each other. That is one of the the things the CNI should take care of for you.同一集群内的Pod之间不需要静态IP就可以进行通信。这是CNI应该为你照顾的事情之一。
I am using CNI is bridge, because there is no route that causes the pods on different worker nodes to not be able to communicate, why can't I configure the static IP is any difficulty
https://github.com/kubernetes-sigs/kind/pull/3553
Isn't this PR just to implement this function, why didn't it pass
Partly because this is something controlled by the container runtime. Any implementation would need to work with docker, podman, and nerdctl in a cleanly abstracted way.
Kind may not be the right tool for your use case right now. The docker network is responsible for assigning the IP address to the container. Assuming you don't run other containers and create a kind cluster in the same way, it's possible the pods will always get assigned the same IP addresses. But there are no guarantees.
same as this https://github.com/kubernetes-sigs/kind/issues/3580#issuecomment-2051784137 , networking is complex , it increase the surface of the project, it is different depending on the implementation of the containers runtimes, and for complex network scenarios it is better to follow my guidelines in https://github.com/kubernetes-sigs/kind/issues/3579#issuecomment-2054097386
We don't support this and we don't plan to. (see https://github.com/kubernetes-sigs/kind/issues/3579#issuecomment-2054175737)
How to fix the ip of a docker container created with the kind command?