containernetworking / plugins

Some reference and example networking plugins, maintained by the CNI team.
Apache License 2.0
2.14k stars 775 forks source link

host-local: save IP for pod and namespace for restore after reboot #983

Open siredmar opened 8 months ago

siredmar commented 8 months ago

We are using openyurt.io to manage edge nodes in our cluster. Edge nodes can be small IoT devices (like Raspberry PI) that can be offline or reboot any time. In order to maintain a stable Pod communication on the host after a reboot, containers need to start with the same IP again. Otherwise node local service resolution won't work.

To make this work, host-local needs to store information about the pod like ip, name and namespace of the container and use this information to start the containers with the same network configuration after a reboot.

For further reference: https://openyurt.io/docs/user-manuals/network/edge-pod-network#ipam-pod-ip-address-kept