Attaching a Load Balancer to an Instance Pool
Attach a load balancer or network load balancer to an instance pool.
If you choose to associate (attach) a load balancer or network load balancer with an instance pool, then when you add an instance to the instance pool, the instance is automatically added to the load balancer's or network load balancer's backend set . After the instance reaches a healthy state (the instance is listening on the configured port number), incoming traffic is automatically routed to the new instance. For background information about the Load Balancer service, see Overview of Load Balancer.
Use the instance-pool attach-lb command to attach a load balancer to an instance pool.
oci compute-management instance-pool attach-lb --backend-set-name <NAME> --instance-pool-id <INSTANCE_POOL_OCID> --load-balancer-id <LOAD_BALANCER_OCID> --port <PORT> --vnic-selection <PrimaryVnic_OR_displayName>
For a complete list of flags and variable options for the Compute Service CLI commands, see the command line reference for Compute.
Use the AttachLoadBalancer operation to attach a load balancer to an instance pool.