I found the GoBetween load-balancer project on Github supports LXD as a “backend” and its support is for both local & remote LXD servers…
If you download the Linux Binary .tar.gz file and un-tar it you will find a its configuration file: ./config/gobetween.toml
If you edit that file as the instructions indicate you will find what appears to be config statements to near the bottom that configure GoBetween to manage Load Balancing for LXD containers on both local and remote LXD Hosts:
– lxd –
kind = “lxd”
lxd_server_address = “unix:///var/lib/lxd/unix.socket” # (required) Address of the LXD server. Either unix:// or https://:port
lxd_server_remote_name = “” # (optional) Name of the LXD server
lxd_server_remote_password = “” # (optional) Password to the remote LXD server. Only used when address scheme is https
lxd_config_directory = “~/.config/lxd” # (optional) Directory where LXD server info and certificates are stored
lxd_generate_client_certs = false # (optional) Generate client SSL certificates for gobetween if not previously generated. Only used when scheme is https
lxd_accept_server_cert = false # (optional) Accept the LXD server certificate. Only used when scheme is https
lxd_container_label_key = “user.label” # (optional) Filter containers that have specified setting
lxd_container_label_value = “foo” # (optional) Filter continers that have specified value of ‘lxd_container_label_key’ setting
lxd_container_port = 0 # (required) Port of container to use
lxd_container_port_key = “user.gobetween.port” # (optional) Container setting key that specifies the port.
lxd_container_interface = “eth0” # (optional) Interface of container to use
lxd_container_interface_key = “user.gobetween.interface” # (optional) Container setting that specifies the interface.
lxd_container_sni_key = “” # (optional) Container setting that specifies the sni name of the container.
lxd_container_address_type = “IPv4” # (optional) Container setting that specifies whether to use an IPv4 or IPv6 address. Valid options are IPv4 or IPv6.