lstellway/do-floating-ip

By lstellway

Updated almost 3 years ago

Reassign DigitalOcean Floating IP to Current Droplet

Image

57

Reassign DigitalOcean Floating IP to Current Droplet

This project has been sourced and tweaked from 5pi/img-do-float-ip(thank you!).

Environment Variables

  • DO_METADATA_API = http://169.254.169.254
    • The metadata API url
  • DO_API = https://api.digitalocean.com
    • The DigitalOcean API url
  • DO_TOKEN
  • DO_TOKEN_FILE
  • DO_FLOATING_IP
    • The DigitalOcean floating IP to keep up-to-date
  • UPDATE_FREQUENCY = 600(10 minutes)
    • The frequency (in seconds) for which to check that the floating IP is up-to-date

Running on Kubernetes

Because Kubernetes masks the "Link Local" IP range required to run this container, the hostNetwork parameter needs to be enabled in the Pod specification:

apiVersion: v1
kind: Pod
spec:
    hostNetwork: true

Docker Pull Command

docker pull lstellway/do-floating-ip