Creates a new load balancer in your Vultr account to distribute traffic across multiple servers for improved availability and performance.
The vultr-cli load-balancer create
command creates a new load balancer in your Vultr account, distributing traffic across multiple servers to improve availability and performance.
$ vultr-cli load-balancer create [flags]
# Full example
$ vultr-cli load-balancer create --region="lax" --balancing-algorithm="roundrobin" --label="Example Load Balancer" \
--port=80 --check-interval=10 --healthy-threshold=15
You must pass --region; other arguments are optional
#Shortened example with aliases
$ vultr-cli lb c -r="lax" -b="roundrobin" -l="Example Load Balancer" -p=80 -c=10
#Full example with attached VPC
$ vultr-cli load-balancer create --region="lax" --label="Example Load Balancer with VPC" \
--vpc="e951822b-10b2-4c5e-b333-bf38033e7175" --balancing-algorithm="leastconn"
| Shorthand | Long Version | Description | |-----------|--------------|-------------| | -b | --balancing-algorithm | (optional) balancing algorithm that determines server selection | roundrobin or leastconn | | - | --certificate | (optional) Path to SSL certificate. | | - | --certificate-b64 | (optional) Path to Base64-encoded SSL certificate. | | - | --certificate-chain | (optional) Path to SSL certificate chain. | | - | --certificate-chain-b64 | (optional) Path to Base64-encoded SSL certificate chain. | | -c | --check-interval | (optional) interval between health checks. | | - | --cookie-name | (optional) the cookie name to make sticky. | | - | --firewall-rules | (optional) a comma-separated, key-value pair list of firewall rules. Use - between each new rule. E.g: "port:80,ip_type:v4,source:0.0.0.0/0-port:8080,ip_type:v4,source:1.1.1.1/4" | | -f | --forwarding-rules | (optional) a comma-separated, key-value pair list of forwarding rules. Use - between each new rule. E.g: "frontend_port:80,frontend_protocol:http,backend_port:80,backend_protocol:http-frontend_port:81, frontend_protocol:http,backend_port:81,backend_protocol:http" | | - | --global-regions | (optional) Deploy the load balancer across multiple global regions. | | - | --healthy-threshold | (optional) number times a check must succeed before returning to healthy status. | | - | --http-version | (optional) Set HTTP version. Use 2 for HTTP2 or 3 for HTTP3. HTTP3 requires HTTP2 to be enabled. | | -i | --instances | (optional) an array of instances IDs that you want attached to the load balancer. | | -l | --label | (optional) the label for your load balancer. | | -n | --nodes | (optional) The number of nodes to add to the load balancer (1-99), must be an odd number | | - | --path | (optional) HTTP Path to check. only applies if protocol is HTTP or HTTPS. | | - | --port | (optional) the port to use for health checks. | | - | --private-key | (optional) Path to SSL private key. | | - | --private-key-b64 | (optional) Path to Base64-encoded SSL private key. | | - | --protocol | (optional) the protocol to use for health checks. | https, http, tcp | | -p | --proxy-protocol | (optional) if true, you must configure backend nodes to accept Proxy protocol. | | -r | --region | region id you wish to have the load balancer created in | | -t | --response-timeout | (optional) timeout before health check fails. | | -s | --ssl-redirect | (optional) if true, this will redirect HTTP traffic to HTTPS. You must have an HTTPS rule and SSL certificate installed on the load balancer to enable this option. | | - | --timeout | (optional) The maximum time allowed for the connection to remain inactive before timing out in seconds. | | -u | --unhealthy-threshold | (optional) number times a check must fail before becoming unhealthy. | | -v | --vpc | (optional) the VPC ID to attach to your load balancer. When not provided, load balancer defaults to public network. |
No comments yet.