Muokkaa

Jaa


Create a standby pool for Azure Container Instances (Preview)

Important

Standby pools for Azure Container Instances is currently in preview. Previews are made available to you on the condition that you agree to the supplemental terms of use. Some aspects of this feature may change prior to general availability (GA).

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 listed in the Standby Pools for Azure Container Instances overview page.

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.

Note

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.