--org, or the one saved in your context.
Aliases: load-balancers, loadbalancers, lb
Commands that act on one load balancer take its ID either as a positional argument or with --id. If you omit it, the CLI opens an interactive picker, so always pass it in scripts.
Subcommands
- list — List load balancers
- get — Get load balancer details
- create — Create a new load balancer
- update — Update an existing load balancer
- delete — Delete an existing load balancer
list
List load balancers, optionally filtered by project, region, or network. The table shows each load balancer’s ID, name, VIP, public IP, and number of listeners.Flags
| Flag | Description |
|---|---|
| Organization ID | |
| Project ID | |
| Region ID | |
| Network ID | |
Emit the full JSON payload (mutually exclusive with -q) | |
jq filter for value extraction (see Query output with -q) |
Examples
get
Get details for a specific load balancer, including its listeners and the VIP and public IP it was given.Flags
| Flag | Description |
|---|---|
| Load balancer ID | |
| Organization ID | |
Emit the full JSON payload (mutually exclusive with -q) | |
jq filter for value extraction (see Query output with -q) |
Example
create
Create a new load balancer. Accepts input from a JSON file or stdin. With neither, the CLI prompts for the name, description, network, whether to allocate a public IP, and an optional VIP, then opens a listener editor where you add each listener and its pool members. The load balancer belongs to the project and region of the network you attach it to. Usenscale networks list to find the network ID.
Flags
| Flag | Description |
|---|---|
| Organization ID | |
| Path to a JSON file | |
| Read JSON from standard input | |
| Preview actions and payload without persisting | |
| Automatically confirm load balancer creation | |
Emit the full JSON payload (mutually exclusive with -q) | |
jq filter for value extraction (see Query output with -q) |
Payload
This example has two listeners: TCP port 80 with a health check, open to any source, and UDP port 53.loadbalancer.json
Some constraints aren’t obvious from the payload:
- Listener names are DNS labels. They start with a lower-case letter, contain only lower-case letters, digits, and hyphens, don’t end with a hyphen, and are at most 63 characters (
^[a-z]([-a-z0-9]*[a-z0-9])?$). - Two listeners can’t share a protocol and port. TCP 53 and UDP 53 can coexist; two TCP 80 listeners can’t.
idleTimeoutSecondsis not supported for UDP listeners. Leave it out of UDP listeners.allowedCidrsand member addresses are IPv4 only.- The network and requested VIP are fixed at creation. To move a load balancer to another network or VIP, create a new one.
Examples
update
Update an existing load balancer. Accepts input from a JSON file or stdin. With neither, the CLI prompts for the name, description, and public IP, then opens the listener editor, all pre-filled from the load balancer as it stands. The payload replaces the load balancer’s metadata,publicIP, and listeners, so include every listener you want to keep. It accepts only metadata, spec.publicIP, and spec.listeners. The network and requested VIP are fixed at creation, and the CLI rejects a payload that contains spec.networkId or spec.vipAddress, so remove them from a create payload before you reuse it.
Flags
| Flag | Description |
|---|---|
| Load balancer ID | |
| Organization ID | |
| Path to a JSON file | |
| Read JSON from standard input | |
| Preview actions and payload without persisting | |
| Automatically confirm load balancer update | |
Emit the full JSON payload (mutually exclusive with -q) | |
jq filter for value extraction (see Query output with -q) |
Examples
delete
Delete an existing load balancer.Flags
| Flag | Description |
|---|---|
| Load balancer ID | |
| Organization ID | |
| Preview actions and payload without persisting | |
| Automatically confirm load balancer delete |
Example
Related
Networks (CLI)
Every load balancer sits on a network and takes its VIP from the network’s CIDR.
VPC networks
How VPC networks isolate your resources, and how they are scoped.
Security groups
Control the traffic that reaches your backend instances.