Managing Load Balancers
You can create and manage load-balancers via the CLI and via the dashboard.
Whichever way you choose to manage your load-balancers, you will first have to create network.
Creating a load-balancer
To create a load-balancer via the CLI, run the following command:
dboxed load-balancer create --name <lb-name> --type caddy --network=<network-name>Replace <lb-name> with the desired name of the load-balancer and <network-name> with the name of an existing
network. The specified network must be the same that you want to run the boxes that needed to be exposed
via the load-balancer.
By default, this will create a load-balancer with a replica count of one. You can change this by specifying --replicas=<replica-count>
to the same create command. You can, however, also change this value later on.
The load-balancer will also use default http/https ports, 80 and 443 to be specific. This can also be overridden via
--http-port=<http-port> and --https-port=<https-port>.
Updating a load-balancer
A load-balancer can be updated/modified after creation via the following command:
dboxed load-balancer update <lb-name> --http-port=<new-http-port> --https-port=<new-https-port> --replicas=<new-replica-count>Only the <lb-name> is mandatory, all other flags are optional.
Deleting a load-balancer
Deletion of the load-balancer can be done via:
dboxed load-balancer rm <lb-name>This will also delete all replica boxes.