AI-200
Azure
Back to Deploy and manage apps on Azure Container Apps

Deploy a container to Container Apps

Verify deployment with logs and status

Overview

After deploying to Azure Container Apps, verify the revision is healthy using status, replicas, and logs. For AI APIs, confirm the app starts, binds the target port, and answers health checks.

Key concepts

  • Revision — immutable snapshot of app configuration + image
  • Provisioning / Running / Failed — revision lifecycle states
  • Log stream — live stdout/stderr from containers
  • Ingress URL — public or internal endpoint for smoke tests

Exam tips

  • Failed pulls and crash loops show up in revision status and logs first
  • Use az containerapp revision list and logs show before redeploying
  • Health probes (later module) reduce false failures from slow AI startup

Azure CLI

Azure CLI
# App + revision status
az containerapp show \
  --name ai-api \
  --resource-group rg-ai200 \
  --query "{fqdn:properties.configuration.ingress.fqdn,latestRevision:properties.latestRevisionName,provisioningState:properties.provisioningState}"

az containerapp revision list \
  --name ai-api \
  --resource-group rg-ai200 \
  -o table

# Stream logs
az containerapp logs show \
  --name ai-api \
  --resource-group rg-ai200 \
  --follow

# Smoke test the ingress
FQDN=$(az containerapp show \
  --name ai-api \
  --resource-group rg-ai200 \
  --query properties.configuration.ingress.fqdn -o tsv)

curl -s "https://$FQDN/health"

Python

Python
import urllib.request

# Quick verification helper after deploy
def check_health(base_url: str) -> None:
    with urllib.request.urlopen(f"{base_url.rstrip('/')}/health", timeout=10) as resp:
        print(resp.status, resp.read().decode())

# check_health("https://ai-api.<region>.azurecontainerapps.io")

Learn more