Home › Studies › AI-200 › Containers › Container Apps & KEDA

Container Apps & KEDA

Environments · containers · revisions · traffic splitting · ingress · secrets · KEDA scale rules

By the tools4free.dev team · Last reviewed November 13, 2026

Practice questions for this topic →

Environments and containers

Pulling images from Azure Container Registry

Revisions

ModeBehaviorDefault
SingleNew revisions are provisioned, activated and scaled; traffic moves once all replicas run. If an update fails, traffic stays on the old revision. Old revisions are deprovisionedYes
MultipleSeveral active revisions, traffic splitting, and you choose when to deprovision old ones. Used for blue-green and A/B testingNo
Deployment labels (preview)Names such as dev, staging, prod for revisions; used for traffic splitting and A/B testingNo
ScopeChangesNew revision?
Revision-scopeAnything in properties.template: revision suffix, container configuration and images, scale rulesYes
Application-scopeAnything in properties.configuration: secret values, revision mode, ingress settings (on/off, traffic splitting rules, labels), private registry credentials, Dapr settingsNo; applies to all revisions
TaskCommand
Update (new revision if revision-scope)az containerapp update
Copy a revision and change settingsaz containerapp revision copy
Activate / deactivate / restartaz containerapp revision activate / deactivate / restart
Set the modeaz containerapp revision set-mode (single or multiple)
Add a labelaz containerapp revision label add

Traffic splitting and ingress

IngressReachable from
ExternalThrough the environment's inbound IP address, and from other apps in the same environment. Public reachability also depends on the environment's network configuration
InternalDirectly only from within the same environment, such as other container apps. Use it for backend services

Secrets and environment variables

Changing a secret value is an application-scope change: no new revision is created, so restart the active revisions.

Scaling and KEDA

RuleThresholdCLI parameterNotes
HTTPconcurrentRequests (default 10)--scale-rule-http-concurrencyConcurrent requests = requests in the past 15 seconds divided by 15. Jobs don't support HTTP rules
TCPconcurrentConnections (default 10)--scale-rule-tcp-concurrencyNot supported in the Azure portal; jobs don't support TCP rules
Custom (KEDA scaler)Scaler type and metadata--scale-rule-type, --scale-rule-metadataAny ScaledObject-based KEDA scaler; event-driven jobs use ScaledJob-based scalers

Authentication for custom rules

Scale behavior

BehaviorValue
Polling interval30 seconds (not used by HTTP and TCP rules)
Cool down period300 seconds; only applies when scaling in from the final replica to 0
Scale up stabilization window0 seconds
Scale down stabilization window300 seconds
Scale up step1, 4, 8, 16, 32, ... up to the maximum
Scale down step100% of replicas that need to shut down
AlgorithmdesiredReplicas = ceil(currentMetricValue / targetMetricValue)

CLI and PowerShell

TaskAzure CLIPowerShell
Update an app (new image)az containerapp update --name <APPLICATION_NAME> --resource-group <RESOURCE_GROUP_NAME> --image <IMAGE_NAME>-
List revisionsaz containerapp revision list --name <APPLICATION_NAME> --resource-group <RESOURCE_GROUP_NAME> -o table-
Copy a revisionaz containerapp revision copy --name <APPLICATION_NAME> --resource-group <RESOURCE_GROUP_NAME> --cpu 0.75 --memory 1.5Gi-
Activate a revisionaz containerapp revision activate --revision <REVISION_NAME> --resource-group <RESOURCE_GROUP_NAME>-
Deactivate a revisionaz containerapp revision deactivate --revision <REVISION_NAME> --resource-group <RESOURCE_GROUP_NAME>-
Restart a revisionaz containerapp revision restart --revision <REVISION_NAME> --resource-group <RESOURCE_GROUP_NAME>-
Set the revision modeaz containerapp revision set-mode --name <APPLICATION_NAME> --resource-group <RESOURCE_GROUP_NAME> --mode <REVISION_MODE>-
Add a revision labelaz containerapp revision label add --revision <REVISION_NAME> --resource-group <RESOURCE_GROUP_NAME> --label <LABEL_NAME>-
Split traffic by revisionaz containerapp ingress traffic set --name <APP_NAME> --resource-group <RESOURCE_GROUP> --revision-weight <REVISION_1>=50 <REVISION_2>=50-
Split traffic by labelaz containerapp ingress traffic set --name <APP_NAME> --resource-group <RESOURCE_GROUP> --label-weight <LABEL_1>=80 <LABEL_2>=20-
Reference a secret in an environment variableaz containerapp update -n <APP NAME> -g <RESOURCE_GROUP_NAME> --set-env-vars <VAR_NAME>=secretref:<SECRET_NAME>-

Exam Tips

Tick each tip once you can answer it without looking.

“Change that creates a new revision” → Revision-scope: anything in properties.template (image, container configuration, scale rules, revision suffix). Trap: Application-scope changes (secrets, ingress, revision mode, registry credentials) apply to all revisions and create none.

“Default revision mode” → Single; a failed update leaves traffic on the old revision. Trap: Multiple revision mode is needed for traffic splitting.

“80/20 split between two revisions” → Multiple revision mode, then az containerapp ingress traffic set --revision-weight. Trap: Weights must total 100%. Copying a revision doesn't change traffic.

“Stable test URL you can repoint to another revision” → Revision label. Trap: A label sits on one revision at a time; the revision suffix is part of the revision name, not a movable URL.

“Secret changed but containers still see the old value” → Restart the active revisions. Trap: A secret change is application-scope, so no new revision is created for you.

“Pass a secret to the container as an environment variable” → secretref:<SECRET_NAME> as the value. Trap: Don't copy the secret value into a plain variable.

“Key Vault secret in az containerapp create” → User-assigned identity with keyvaultref: and identityref: and Key Vault Secrets User. Trap: A system-assigned identity doesn't exist until after the app is created.

“Pull from ACR without a password” → Enable a managed identity, assign acrPull, set the registry identity (system or resource ID). Trap: Don't set a username and password with managed identity.

“Backend called only by other apps in the environment” → Internal ingress. Trap: External ingress also exposes the app through the environment's inbound IP.

“Apps that must share network and log destination” → Put them in the same environment. Trap: Use separate environments to isolate teams or test vs. production.

“Image tag for Container Apps deployments” → Unique tag (Git hash, date and time). Trap: Static tags like latest cause caching problems and make troubleshooting hard.

“Scale rule kinds” → HTTP, TCP, or custom (any ScaledObject-based KEDA scaler). Trap: Jobs don't support HTTP or TCP rules; event-driven jobs use ScaledJob-based scalers.

“Defaults without a scale rule” → HTTP rule, min 0, max 10 replicas. Trap: No ingress and no minimum replicas means the app scales to zero and can't start again.

“Secret for a KEDA scaler” → Container Apps secret plus --scale-rule-auth. Trap: Prefer managed identity (--scale-rule-identity, identity property) where supported; it isn't supported in the portal.

“Replicas for a queue length” → desiredReplicas = ceil(currentMetricValue / targetMetricValue) (queue length / messageCount), capped by the maximum and by max(4, 2*currentReplicaCount). Trap: Scale in waits 300 seconds, and only the last replica waits for the 300-second cool down.

“Zero replicas” → No usage charges; the default minimum is 0. Trap: Set the minimum to 1 or higher to keep an instance always running.

“Polling interval does not apply to” → HTTP and TCP scale rules. Trap: It is 30 seconds for custom (KEDA) rules.

Sources

Checked against Microsoft Learn on November 13, 2026.

← Container Registry & App ServiceAKS Deployments & Troubleshooting →