Automating IP Address and Network Changes in Kubernetes
2025-03-11

The author's Kubernetes cluster relies on dynamically assigned IP addresses, creating vulnerabilities in its network configuration. To address this, a Kubernetes deployment was created to periodically check and update the public IP addresses of their Unifi gateway using the Unifi API. Upon detecting changes in IP addresses or IPv6 networks, it automatically updates Unifi firewall rules and Kubernetes service resources (including MetalLB configuration), and notifies the user via MQTT. The program is written in Python and leverages Kubernetes and Unifi APIs for automation.
Development
IP Address Management