Attaching an Instance to an Instance Pool
Attach an existing instance to an instance pool, and then select which instances you want to manage as a group.
When you attach an instance to an instance pool, the pool size increases.
If an autoscaling configuration is associated with the instance pool, then ensure that the autoscaling policy defines a maximum pool size that's large enough for the expanded pool by editing the autoscaling policy. If you attach an instance and it causes the pool size to increase above the maximum autoscaling target, then a future autoscaling event might decrease the pool size and delete instances.
If load balancers are attached to the pool, then the instance is also added to the load balancers.
Before You Begin
To attach an instance to an instance pool, all the following things must be true:
- The instance and the pool are running.
- The instance is the same machine type as the pool, either virtual machine or bare metal.
- The instance is in the same availability domain and fault domain as the pool.
- The instance's primary VNIC is in the same virtual cloud network (VCN) and subnet as the pool.
- If secondary VNICs are defined, then the instance's secondary VNIC is in the same VCN and subnet as the secondary VNICs used by other instances in the pool.
- The instance is not attached to another pool.
You must also have the name or OCID of the instance that you want to attach.
To attach an instance to an instance pool: - Open the navigation menu and click Compute. Under Compute, click Instance Pools.
- In the List scope section, select the compartment that contains the instance pool that you want to update.
- Click the name of the instance pool to which you want to attach to an instance to display the details page.
- In the Resources section, click Attached instances.
- In the Attached instances section, click Attach instance to display the Attach instance to instance pool dialog.
- In the Input type list, select either Instance pool name or Instance pool OCID.
- In the Instance in compartment list, select the name of the instance or enter its OCID.
- Click Attach instance.
Use the instance-pool-instance attach command to attach an existing instance to an instance pool.
oci compute-management instance-pool-instance attach --instance-id <INSTANCE_OCID>
For a complete list of flags and variable options for the Compute Service CLI commands, see the command line reference for Compute.
Use the AttachInstancePoolInstance operation to attach an existing instance to an instance pool.