DHCP in K8's
cd ./docker
docker build -t kubernetes-dhcp .
docker tag kubernetes-dhcp:latest <your-docker-registry>/kubernetes-dhcp:latest
docker push <your-docker-registry>/kubernetes-dhcp:latest
kubectl apply -k ./k8s
-
dhcp-backup will use the /dhcpd/leases and /dhcpd/config files running and backup a tar file to an S3 bucket of choice
-
it is intended to be run via a kubernetes cronjob to facilitate backups being taken pieroticly.
-
dhcp-backup runs at a rootless user (1000) the intention is that the fsgroup will get set to 1000 so that the backupuser can access the files from the dhcp server
- Docker run command with the bucket access information passed in as envioment variables
docker run -d \
-v /path/to/local/leases:/dhcpd/leases:ro \
-v /path/to/local/config:/dhcpd/config:ro \
-e S3_ENDPOINT='https://example.com' \
-e S3_ACCESS_KEY='accesskey' \
-e S3_SECRET_KEY='secretkey' \
-e S3_BUCKET='s3://yourbucket/' \
-e S3_PATH='backups/' \
dhcp-backup