Updating an Instance Pool

You can update the number of instances for an instance pool.

Optionally, you can associate a load balancer with an instance pool. If you do this, when you add an instance to the instance pool, the instance is automatically added to the 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 Balancing service, see Overview of Load Balancing.

To update other settings for an instance pool, use the command line interface (CLI), SDKs, or REST APIs.

You can automatically adjust the number of instances in an instance pool based on performance metrics or a schedule. To do this, you enable autoscaling for the instance pool. For background information and steps, see Autoscaling.

See Managing Compute Instances for more information about instance pools and instance configurations.

Required IAM Policy

To use Oracle Cloud Infrastructure, you must be given the required type of access in a policy  written by an administrator, whether you're using the Console or the REST API with an SDK, CLI, or other tool. If you try to perform an action and get a message that you don’t have permission or are unauthorized, confirm with your administrator the type of access you've been granted and which compartment  you should work in.

For administrators: For a typical policy that gives access to instance pools and instance configurations, see Let users manage Compute instance configurations, instance pools, and cluster networks.

Important

See this known issue for information about the policy statements that are required if the instance configuration or load balancer associated with the instance pool includes defined tags.

Tagging Resources

You can add tags to your resources to help you organize them according to your business needs. You can add tags at the time you create a resource, or you can update the resource later with the desired tags. For general information about applying tags, see Resource Tags.

Using the Console

To update the instance pool size
  1. Open the navigation menu. Under Core Infrastructure, go to Compute and click Instance Pools.
  2. Click the name of the instance pool that you're interested in.
  3. Click Edit.

  4. Specify the updated number of instances for the instance pool, and then click Save Changes.

When you update the instance pool size, it triggers a scaling event. Keep the following in mind:

  • If the instance pool lifecycle state is RUNNING, the instance pool will create new instances or terminate existing instances at that time, to match the new size of the instance pool. Instances are terminated in the order that they were created, first-in, first-out.

  • If the instance pool lifecycle state is STOPPED, for an increase in size, new instances will be configured for the instance pool, but won't be launched. For a decrease in size, the instances will be terminated.

To track the progress of the operation, you can monitor the associated work request. For more information, see Using the Console to View Work Requests.
Important

If the instance pool has been in the scaling or provisioning state for an extended period of time, it may be because the number of instances requested has exceeded your tenancy's service limits for that shape and availability domain. Check your tenancy's service limits for Compute.
To attach a load balancer to an instance pool

You must have a load balancer and backend set to associate with the instance pool. For steps to create a load balancer, see Managing Load Balancers.

  1. Open the navigation menu. Under Core Infrastructure, go to Compute and click Instance Pools.
  2. Click the name of the instance pool that you're interested in.
  3. Under Resources, click Load Balancers.
  4. Click Attach a Load Balancer.
  5. Enter the following:

    • Load balancer: The load balancer to associate with the instance pool.
    • Backend set: The name of the backend set on the load balancer to add instances to.
    • Port: The server port on the instances to which the load balancer must direct traffic. This value applies to all instances that use this load balancer attachment.
    • VNIC: The VNIC  to use when adding the instance to the backend set. Instances that belong to a backend set are also called backend servers. The private IP address is used. This value applies to all instances that use this load balancer attachment.
  6. Click Attach.

    To track the progress of the operation, you can monitor the associated work request. For more information, see Using the Console to View Work Requests.
  7. If you want to associate additional load balancers with the instance pool, click + Another Load Balancer. Then, repeat the previous steps. Do this for each additional load balancer you want to associate with the instance pool.
To detach a load balancer from an instance pool
  1. Open the navigation menu. Under Core Infrastructure, go to Compute and click Instance Pools.
  2. Click the name of the instance pool that you're interested in.
  3. Under Resources, click Load Balancers.
  4. Click the Actions icon (three dots) for the load balancer you want to detach.
  5. Click Detach Load Balancer, and then click Detach to confirm.

    To track the progress of the operation, you can monitor the associated work request. For more information, see Using the Console to View Work Requests.
To manage tags for an instance pool
  1. Open the navigation menu. Under Core Infrastructure, go to Compute and click Instance Pools.
  2. Click the instance pool that you're interested in.
  3. Click the Tags tab to view or edit the existing tags. Or click More Actions, and then click Add tags to add new ones.

For more information, see Resource Tags.

Using the API

To update other instance pool configuration settings, use the CLI, SDKs, or REST APIs. For information about using the CLI, see Command Line Interface (CLI). 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.

For instance pool configuration settings, such as the instance configuration, display name, tags, or availability domain selections, use the UpdateInstancePool operation.

To manage the load balancers that are associated with an instance pool, use the AttachLoadBalancer and DetachLoadBalancer operations.

To update the configuration that is used by an instance pool when creating instances, you can do either of the following things:

  • Create a new instance configuration with the desired settings. You can do this using the Console. For steps, see Creating an Instance Configuration. To do this using the API, use the CreateInstanceConfiguration operation.

  • Update the existing instance configuration for the instance pool. You can only update the display name and tags of existing instance configurations. For any other updates, create a new instance configuration with the settings you want to use. To update the display name or tags, use the UpdateInstanceConfiguration operation. You cannot use the Console to update instance configuration settings.