Controlling multiple kubernetes nodes from a single UPS server on a Synology NAS



Most UPS systems only have one USB port to control a single device in the event power outage and the battery running low. I have a couple of Synology NAS boxes with UPS and these can be used to shut down other devices safely.

Synology Setup

Ubuntu

Synology is running a NUT Server (http://networkupstools.org) and in this part we have to install the Nut-client to monitor the NAS. The Linux set up is below, but the same basic steps apply for Mac/Windows. The NUT website has download/install instructions specific to Windows/Mac.

  1. Install NUT
sudo apt-get install nut
  1. Modify /etc/nut/nut.conf file to specify your computer/server as a client instead of server. Edit this specific line:
MODE=netclient
  1. Add Synology address and credentials to /etc/nut/upsmon.conf
MONITOR ups@192.168.0.102 1 monuser secret slave

*Note: these credentials can be changed or you can add a user by SSHing into the NAS and modifying /etc/ups/upsd.users.

  1. Lastly, start the nut-client service.
service nut-client restart