Managing Instance Pool Load Balancer Attachments

On Compute Cloud@Customer, you can attach a load balancer to an instance pool or detach a load balancer attachment from an instance pool.

    1. In the Compute Cloud@Customer Console navigation menu, click Compute, then click Instance Pools.

    2. At the top of the page, select the compartment that contains the instance pool for which you want to manage load balancer attachments.
    3. Click the name of the pool that you want to manage.

    4. Under Resources, click Load Balancers.

      • To attach a load balancer, click Attach Load Balancer.

        On the Attach Load Balancer dialog box, specify the load balancer, backend set, port number, and VNIC as described in Creating an Instance Pool, and click Attach Load Balancer.

      • To remove a load balancer attachment, click the Actions menu (An image of the three dot icon.) for the load balancer attachment that you want to remove, and click Detach.

        The load balancer attachment remains visible in the load balancers list in the Detached state for at least 24 hours, up to 24.5 hours. No further action is needed to detach the load balancer attachment.

  • Use the oci compute-management instance-pool attach-lb command and required parameters to attach a load balancer to the instance pool.

    oci compute-management instance-pool attach-lb --backend-set-name <backend-set-name> --instance-pool-id <instance-pool_OCID> --load-balancer-id <load-balancer_OCID> --port <port_for_backend_set> --vnic-selection <VNIC_display_name> [OPTIONS]

    For a complete list of CLI commands, flags, and options, see the Command Line Reference.

    Procedure

    • To attach a load balancer to an instance pool:

      1. Get the following information:

        • OCID of the instance pool to which you want to attach a load balancer: oci compute-management instance-pool list

        • OCID of the load balancer and name of the backend set: oci lb load-balancer list

        • Port value to use when creating the backend set.

        • VNIC to associate with the load balancer. The value can be PrimaryVnic or the display name of one of the secondary VNICs on the instance configuration that's associated with the instance pool.

      2. Run the instance pool attach load balancer command.

        Example:

        $ oci compute-management instance-pool attach-lb --instance-pool-id ocid1.instancePool.unique_ID --load-balancer-id ocid1.loadbalancer.unique_ID --backend-set-name BES1 --port 80 --vnic-selection PrimaryVnic
    • Remove or detach a load balancer from an instance pool:

      1. Get the following information:

        • OCID of the instance pool

        • OCID of the load balancer

        • Backend set name

      2. Run the instance pool detach load balancer command.

        Example:

        $ oci compute-management instance-pool detach-lb --instance-pool-id ocid1.instancePool.unique_ID --load-balancer-id ocid1.loadbalancer.unique_ID --backend-set-name BES1

        When you get or list the instance pool, the load balancer attachment remains visible in state DETACHED for at least 24 hours, up to 24.5 hours. No further action is needed to detach the load balancer attachment.

  • Use the following operations to attach or detach a load balancer to an instance pool.

    For information about using the API and signing requests, see REST APIs and Security Credentials. For information about SDKs, see Software Development Kits and Command Line Interface.