Skip to content

Load balancer CLI reference

See https://docs.openstack.org/ocata/cli-reference/neutron.html

These commands allow you to create, list, show details of, and delete load balancers, listeners, pools, and health monitors in the Load Balancer service. The <loadbalancer_id>, <listener_id>, <pool_id>, and <healthmonitor_id> in the commands are placeholders that should be replaced with the actual IDs of the respective resources.

List load balancers

Bash
openstack loadbalancer list

Show load balancer details

Bash
openstack loadbalancer show <loadbalancer_id>

Create a load balancer

Bash
openstack loadbalancer create --name <loadbalancer_name> --vip-subnet-id <subnet_id>

Delete a load balancer

Bash
openstack loadbalancer delete <loadbalancer_id>

List listeners

Bash
openstack loadbalancer listener list

Show listener details

Bash
openstack loadbalancer listener show <listener_id>

Create a listener

Bash
openstack loadbalancer listener create --name <listener_name> --protocol <protocol> --protocol-port <port> <loadbalancer_id>

Delete a listener

Bash
openstack loadbalancer listener delete <listener_id>

List pools

Bash
openstack loadbalancer pool list

Show pool details

Bash
openstack loadbalancer pool show <pool_id>

Create a pool

Bash
openstack loadbalancer pool create --name <pool_name> --lb-algorithm <algorithm> --listener <listener_id> --protocol <protocol>

Delete a pool

Bash
openstack loadbalancer pool delete <pool_id>

List Health monitors

Bash
openstack loadbalancer healthmonitor list

Show health monitor details

Bash
openstack loadbalancer healthmonitor show <healthmonitor_id>

Create a health monitor

Bash
openstack loadbalancer healthmonitor create --name <healthmonitor_name> --delay <delay> --max-retries <retries> --timeout <timeout> --type <type> <pool_id>

Delete a health monitor

Bash
openstack loadbalancer healthmonitor delete <healthmonitor_id>