Edit

Share via


Create a standby pool for Azure Container Instances

Important

For standby pools to successfully create and manage resources, it requires access to the associated resources in your subscription. Ensure the correct permissions are assigned to the standby pool resource provider in order for your standby pool to function properly. For detailed instructions, see configure role permissions for standby pools.

This article steps through creating a container group profile and using that profile to configure a standby pool for Azure Container Instances.

Prerequisites

Before utilizing standby pools, complete the feature registration and configure role based access controls. For more information see Configure role permissions for standby pools in Azure Container Instances

Create a container group profile

The container group profile tells the standby pool how to configure the containers in the pool. If you make changes to the container group profile, you also need to update your standby pool to ensure the updates are applied to the instances in the pool.

To use confidential containers update the sku type to Confidential when creating your container group profile.

Create a container group profile using az container container-group-profile create. You can optionally include config map details in the container group profile. For more information on config maps, see use config maps.

az container container-group-profile create \
    --resource-group myResourceGroup \
    --name mycontainergroupprofile \
    --___location WestCentralUS \
    --image nginx \
    --os-type Linux \ 
    --ip-address Public \ 
    --ports 8000 \ 
    --cpu 1 \
    --memory 1.5 \
    --restart-policy Never

Create a standby pool

Create a standby pool and associate it with a container group profile using az standby-container-group-pool create.

az standby-container-group-pool create \
   --resource-group myResourceGroup \
   --___location WestCentralUS \
   --name myStandbyPool \
   --max-ready-capacity 20 \
   --refill-policy always \
   --container-profile-id "/subscriptions/{subscriptionId}/resourceGroups/myResourceGroup/providers/Microsoft.ContainerInstance/containerGroupProfiles/mycontainergroupprofile"

Next steps

Request a container from the standby pool.