Skip to content

stratumctl lb

Manage load balancers, target groups

Terminal window
stratumctl lb [flags]

Aliases: load-balancing

Manage load-balancer listeners

Terminal window
stratumctl lb listeners [flags]

Aliases: listener

Create a listener that default-forwards to a target group

Terminal window
stratumctl lb listeners create <lb-id> [flags]
Terminal window
stratumctl lb listeners create lb-7k2m9x4q8a --protocol HTTP --port 80 --target-group tg-3k8m2x7q9a
stratumctl lb listeners create lb-7k2m9x4q8a --protocol HTTPS --port 443 --target-group tg-3k8m2x7q9a
Flag Type Default Description
--port int 0 Listener port (required)
--project string Project ID (defaults to STRATUM_PROJECT or profile project_id)
--protocol string Listener protocol: HTTP | HTTPS | TCP (required)
--target-group string Default forward target group ID (required)

Delete a listener

Terminal window
stratumctl lb listeners delete <listener-id> [flags]
Terminal window
stratumctl lb listeners delete lis-5k8m2x7q9a
Flag Type Default Description
--force bool false delete a platform-owned resource anyway (needs platform:ManageInternal; audited; the platform re-creates it)
--project string Project ID (defaults to STRATUM_PROJECT or profile project_id)

Describe a listener

Terminal window
stratumctl lb listeners get <listener-id> [flags]
Terminal window
stratumctl lb listeners get lis-5k8m2x7q9a
stratumctl lb listeners get lis-5k8m2x7q9a --output json
Flag Type Default Description
--project string Project ID (defaults to STRATUM_PROJECT or profile project_id)

List a load balancer’s listeners

Terminal window
stratumctl lb listeners list <lb-id> [flags]
Terminal window
stratumctl lb listeners list lb-7k2m9x4q8a
stratumctl lb listeners list lb-7k2m9x4q8a --output json
Flag Type Default Description
--project string Project ID (defaults to STRATUM_PROJECT or profile project_id)

Manage load balancers

Terminal window
stratumctl lb load-balancers [flags]

Aliases: load-balancer, lbs

Create a load balancer (returns 202; poll lb load-balancers get until state=active)

Terminal window
stratumctl lb load-balancers create <name> [flags]
Terminal window
stratumctl lb load-balancers create web-lb --scheme internet-facing --vpc-id vpc-9k2m4x7q --subnet-ids subnet-3k8m2x7q
stratumctl lb load-balancers create internal-lb --scheme internal --vpc-id vpc-9k2m4x7q --subnet-ids subnet-3k8m2x7q,subnet-6k2m8x4q \
--security-group-ids sg-3f8d2k9x
Flag Type Default Description
--description string Free-form description
--display-name string Human-friendly display name
--project string Project ID (defaults to STRATUM_PROJECT or profile project_id)
--region string Region override
--scheme string internet-facing | internal (required)
--security-group-ids stringSlice Security group IDs to attach to the LB NIC (comma-separated)
--subnet-ids stringSlice Subnet IDs to place the data plane in (comma-separated, at least one required)
--type string Load-balancer type (e.g. application)
--vpc-id string VPC ID (required)

Delete a load balancer

Terminal window
stratumctl lb load-balancers delete <lb-id> [flags]
Terminal window
stratumctl lb load-balancers delete lb-7k2m9x4q8a
Flag Type Default Description
--force bool false delete a platform-owned resource anyway (needs platform:ManageInternal; audited; the platform re-creates it)
--project string Project ID (defaults to STRATUM_PROJECT or profile project_id)

Describe a load balancer

Terminal window
stratumctl lb load-balancers get <lb-id> [flags]
Terminal window
stratumctl lb load-balancers get lb-7k2m9x4q8a
stratumctl lb load-balancers get lb-7k2m9x4q8a --output json
Flag Type Default Description
--project string Project ID (defaults to STRATUM_PROJECT or profile project_id)

List load balancers in a project

Terminal window
stratumctl lb load-balancers list [flags]
Terminal window
stratumctl lb load-balancers list
stratumctl lb load-balancers list --output json
Flag Type Default Description
--project string Project ID (defaults to STRATUM_PROJECT or profile project_id)

Modify a load balancer (security groups)

Terminal window
stratumctl lb load-balancers update <lb-id> [flags]
Terminal window
stratumctl lb load-balancers update lb-7k2m9x4q8a --security-group-ids sg-3f8d2k9x,sg-7k2m9x4q
Flag Type Default Description
--project string Project ID (defaults to STRATUM_PROJECT or profile project_id)
--security-group-ids stringSlice Replacement security group IDs for the LB NIC (comma-separated; empty clears)

Manage load-balancer middleware (request/response filters)

Terminal window
stratumctl lb middleware [flags]

Aliases: middlewares, mw

Create a middleware (–config is a JSON object; per-kind schema)

Terminal window
stratumctl lb middleware create <lb-id> <name> [flags]
Terminal window
stratumctl lb middleware create lb-7k2m9x4q8a rate-100 --kind rate_limit --config-json '{"requestsPerSecond":100}'
Flag Type Default Description
--config-json string JSON config for the kind, e.g. ‘{“requestsPerSecond”:100}’
--kind string Middleware kind (e.g. rate_limit, headers, request_body_limit) (required)
--project string Project ID (defaults to STRATUM_PROJECT or profile project_id)

Delete a middleware

Terminal window
stratumctl lb middleware delete <middleware-id> [flags]
Terminal window
stratumctl lb middleware delete mw-4k8m2x7q9a
Flag Type Default Description
--project string Project ID (defaults to STRATUM_PROJECT or profile project_id)

Describe a middleware

Terminal window
stratumctl lb middleware get <middleware-id> [flags]
Terminal window
stratumctl lb middleware get mw-4k8m2x7q9a
stratumctl lb middleware get mw-4k8m2x7q9a --output json
Flag Type Default Description
--project string Project ID (defaults to STRATUM_PROJECT or profile project_id)

List a load balancer’s middleware

Terminal window
stratumctl lb middleware list <lb-id> [flags]
Terminal window
stratumctl lb middleware list lb-7k2m9x4q8a
stratumctl lb middleware list lb-7k2m9x4q8a --output json
Flag Type Default Description
--project string Project ID (defaults to STRATUM_PROJECT or profile project_id)

Manage listener rules (priority-ordered conditions → actions)

Terminal window
stratumctl lb rules [flags]

Aliases: rule, listener-rules

Attach a middleware to a rule (ordered chain)

Terminal window
stratumctl lb rules attach-middleware <rule-id> [flags]
Terminal window
stratumctl lb rules attach-middleware lbr-6k2m8x4q7a --middleware mw-4k8m2x7q9a
stratumctl lb rules attach-middleware lbr-6k2m8x4q7a --middleware mw-4k8m2x7q9a --position 1
Flag Type Default Description
--middleware string Middleware ID to attach (required)
--position int 0 Position in the chain (lower runs first)
--project string Project ID (defaults to STRATUM_PROJECT or profile project_id)

Create a listener rule (–conditions + –actions are JSON objects)

Terminal window
stratumctl lb rules create <listener-id> [flags]
Terminal window
stratumctl lb rules create lis-5k8m2x7q9a --priority 10 --conditions '{"path_prefix":"/api"}' --actions '{"type":"forward","target_group_id":"tg-3k8m2x7q9a"}'
Flag Type Default Description
--actions string JSON action, e.g. ‘{“type”:“forward”,“target_group_id”:“tg-…”}’ (required)
--conditions string JSON conditions, e.g. ‘{“path_prefix”:“/v2”,“hosts”:[“api.example.com”]}’ (required)
--priority int 0 Rule priority (lower matches first, required)
--project string Project ID (defaults to STRATUM_PROJECT or profile project_id)

Delete a listener rule

Terminal window
stratumctl lb rules delete <rule-id> [flags]
Terminal window
stratumctl lb rules delete lbr-6k2m8x4q7a
Flag Type Default Description
--project string Project ID (defaults to STRATUM_PROJECT or profile project_id)

List a listener’s rules

Terminal window
stratumctl lb rules list <listener-id> [flags]
Terminal window
stratumctl lb rules list lis-5k8m2x7q9a
stratumctl lb rules list lis-5k8m2x7q9a --output json
Flag Type Default Description
--project string Project ID (defaults to STRATUM_PROJECT or profile project_id)

Manage SSL certificates and attach them to HTTPS listeners

Terminal window
stratumctl lb ssl-certificates [flags]

Aliases: ssl-certificate, certs, cert

Attach a certificate to an HTTPS listener (SNI)

Terminal window
stratumctl lb ssl-certificates attach <listener-id> [flags]
Terminal window
stratumctl lb ssl-certificates attach lis-5k8m2x7q9a --certificate cert-2k8m4x7q9a
stratumctl lb ssl-certificates attach lis-5k8m2x7q9a --certificate cert-2k8m4x7q9a --position 1
Flag Type Default Description
--certificate string SSL certificate ID to attach (required)
--position int 0 SNI ordering (lower matched first)
--project string Project ID (defaults to STRATUM_PROJECT or profile project_id)

Delete an SSL certificate (detach from listeners first)

Terminal window
stratumctl lb ssl-certificates delete <cert-id> [flags]
Terminal window
stratumctl lb ssl-certificates delete cert-2k8m4x7q9a
Flag Type Default Description
--project string Project ID (defaults to STRATUM_PROJECT or profile project_id)

Describe an SSL certificate

Terminal window
stratumctl lb ssl-certificates get <cert-id> [flags]
Terminal window
stratumctl lb ssl-certificates get cert-2k8m4x7q9a
stratumctl lb ssl-certificates get cert-2k8m4x7q9a --output json
Flag Type Default Description
--project string Project ID (defaults to STRATUM_PROJECT or profile project_id)

List SSL certificates in a project

Terminal window
stratumctl lb ssl-certificates list [flags]
Terminal window
stratumctl lb ssl-certificates list
stratumctl lb ssl-certificates list --output json
Flag Type Default Description
--project string Project ID (defaults to STRATUM_PROJECT or profile project_id)

Upload a PEM certificate + private key

Terminal window
stratumctl lb ssl-certificates upload <name> [flags]
Terminal window
stratumctl lb ssl-certificates upload web-cert --cert-file fullchain.pem --key-file privkey.pem
Flag Type Default Description
--cert-file string Path to the PEM certificate (required)
--key-file string Path to the PEM private key (required)
--project string Project ID (defaults to STRATUM_PROJECT or profile project_id)

Manage target groups

Terminal window
stratumctl lb target-groups [flags]

Aliases: target-group, tg

Create a target group

Terminal window
stratumctl lb target-groups create <name> [flags]
Terminal window
stratumctl lb target-groups create web-tg --target-type instance --port 8080 --vpc-id vpc-9k2m4x7q
stratumctl lb target-groups create asg-tg --target-type auto-scaling-group --port 80 --protocol http --vpc-id vpc-9k2m4x7q
Flag Type Default Description
--display-name string Human-friendly display name
--port int 0 Target port (required)
--project string Project ID (defaults to STRATUM_PROJECT or profile project_id)
--protocol string Protocol (e.g. http, https, tcp)
--target-type string instance | network-interface | ip | auto-scaling-group (required)
--vpc-id string VPC ID (required)

Delete a target group

Terminal window
stratumctl lb target-groups delete <target-group-id> [flags]
Terminal window
stratumctl lb target-groups delete tg-3k8m2x7q9a
Flag Type Default Description
--force bool false delete a platform-owned resource anyway (needs platform:ManageInternal; audited; the platform re-creates it)
--project string Project ID (defaults to STRATUM_PROJECT or profile project_id)

Describe a target group

Terminal window
stratumctl lb target-groups get <target-group-id> [flags]
Terminal window
stratumctl lb target-groups get tg-3k8m2x7q9a
stratumctl lb target-groups get tg-3k8m2x7q9a --output json
Flag Type Default Description
--project string Project ID (defaults to STRATUM_PROJECT or profile project_id)

List target groups in a project

Terminal window
stratumctl lb target-groups list [flags]
Terminal window
stratumctl lb target-groups list
stratumctl lb target-groups list --output json
Flag Type Default Description
--project string Project ID (defaults to STRATUM_PROJECT or profile project_id)

Register / list / deregister targets in a target group

Terminal window
stratumctl lb targets [flags]

Aliases: target

Deregister a target from a target group

Terminal window
stratumctl lb targets deregister <target-group-id> [flags]
Terminal window
stratumctl lb targets deregister tg-3k8m2x7q9a --target-id i-uy3ureaklq
Flag Type Default Description
--project string Project ID (defaults to STRATUM_PROJECT or profile project_id)
--target-id string Target ID to deregister (required)

List a target group’s targets and their health

Terminal window
stratumctl lb targets list <target-group-id> [flags]
Terminal window
stratumctl lb targets list tg-3k8m2x7q9a
stratumctl lb targets list tg-3k8m2x7q9a --output json
Flag Type Default Description
--project string Project ID (defaults to STRATUM_PROJECT or profile project_id)

Register a target (instance, NIC, IP or auto scaling group) into a target group

Terminal window
stratumctl lb targets register <target-group-id> [flags]
Terminal window
stratumctl lb targets register tg-3k8m2x7q9a --target-id i-uy3ureaklq --port 8080
stratumctl lb targets register tg-3k8m2x7q9a --target-type ip --target-id 10.0.1.20 --port 8080 --weight 2
Flag Type Default Description
--ip-address string The address for an ip target; optional for resolved types, where it must match the resolved address
--port int 0 Target port (required; ignored for an auto-scaling-group target)
--project string Project ID (defaults to STRATUM_PROJECT or profile project_id)
--target-id string What the target names: an IP (ip), an instance id i-… (instance), a NIC id nic-… (network-interface) or a group id asg-… (auto-scaling-group) (required)
--target-type string instance | network-interface | ip | auto-scaling-group (default: the target group’s)
--weight int 1 Relative traffic weight