skip to Main Content

I have created an azure container app with quick image. Here my container app is in consumption workload profile as when deploying with quick start image there is no option to select between workload profiles.

Now I want to switch my container app’s workload profile from consumption to the dedicated workload profile which I have created.

Any suggestions on how to achieve this?

Thank You..

I couldn’t find a legit solution for this.

I am able to add dedicated workload profiles in the container apps Environment. So I have just Deleted my container app and created again but this time with an explicit docker image. Here it gave me choice to select between my workload profiles.

2

Answers


  1. Unfortunately there is no way to switch profile from an already running container app. To switch your Azure Container App’s workload profile from Consumption to Dedicated, you will need to redeploy your app with the dedicated profile.

    By the way, when creating a container app with a quick start image, you are limited to the Consumption workload profile only. However, when deploying with an explicit Docker image, you will be given the option to select from your available workload profiles.

    1. Delete your current container app.

    2. Create and push your explicit Docker image to your acr
      enter image description here

    3. Select the dedicated workload profile you want to use during the creation process.

    az containerapp env workload-profile add 
      --name ArkoContainerAppEnv 
      --resource-group arkorg 
      --workload-profile-name ArkoDedicate 
      --workload-profile-type D4 
      --min-nodes 1 
      --max-nodes 2
    

    enter image description here

    1. Create a new container app with an explicit Docker image with the workload profile
    az containerapp create 
      --resource-group arkorg 
      --name arkocontainerapp1 
      --image arkoacr1.azurecr.io/sample-app:v1 
      --environment ArkoContainerAppEnv 
      --workload-profile-name ArkoDedicated 
      --cpu 1 
      --memory 2Gi
    

    enter image description here

    You can verify or edit the same from by using

    az containerapp show --resource-group arkorg--name arkocontainerapp1 > current-config.json
    

    enter image description here

    if you do any edit in the workloadprofile then you can update it using-

    az containerapp update --resource-group arkorg--name arkocontainerapp1 --set workloadProfileName=vivekdedicated
    
    Login or Signup to reply.
  2. You can change on Azure Portal, Container App Overview page, Properties, Workload profile.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search