k3d-io / k3d

Little helper to run CNCF's k3s in Docker
https://k3d.io/
MIT License
5.48k stars 462 forks source link

Add nginx DNS expiration time configuration #1423

Closed eshizhan closed 7 months ago

eshizhan commented 7 months ago

What

Add a shorter DNS expiration time to avoid inaccessibility caused by IP address changes when the node container is restarted.

Why

When the node container is restarted or the docker service is restarted, the node IP may change, but nginx will cache the IP of the node domain name, causing the reverse proxy to fail.

Implications

Since the cache time is shortened, it will have a slight impact on the performance of the nginx reverse proxy, so you don't need to worry about it.