Keeps floating IPs assigned to your Kubernetes cluster
This project is intended to be run as a Kubernetes pod inside a DOK (DigitalOcean Kubernetes) cluster.
The controller will assign a floating IP (via the DigitalOcean API) to a cluster node. The lifecycle of the application is:
- Get list of nodes
- Select a node to assign
- Currently the first returned node is selected
- Check if the IP is already assigned to this node
- If so, do nothing
- If not, assign it
- Sleep for a time, then repeat
You must provide the following as environment variables:
DIGITALOCEAN_TOKEN- DigitalOcean API token
FLOATING_IP- Floating IP address that this controller manages
You can provide the following as environment variables:
NODE_SELECTOR- Value for
labelSelectoron the node query
- Value for
You can customize the deploy.yaml file then kubectl apply it to
install to a cluster. You can also use kustomize in the subdirectory.