SKILL.md
Azure CLI Operations
Purpose
Common Azure CLI operations for managing YT Summarizer infrastructure resources including container registries, Kubernetes clusters, storage accounts, and secrets.
When to Use
- Checking container image tags in ACR
- Managing AKS cluster resources
- Querying storage accounts and connection strings
- Retrieving secrets from Key Vault
- Validating Azure resource status
Do Not Use When
- Modifying production infrastructure (use Terraform)
- Making permanent configuration changes
- Operations that should be automated in CI/CD
Common Operations
Azure Container Registry (ACR)
List image tags
az acr repository show-tags \
--name acrytsummprdci \
--repository yt-summarizer-api \
--orderby time_desc \
--top 10
Show repository manifests
az acr repository show-manifests \
--name acrytsummprdci \
--repository yt-summarizer-api
Check repository list
az acr repository list --name acrytsummprdci
Azure Kubernetes Service (AKS)
Get cluster credentials
az aks get-credentials \
--resource-group rg-yt-summarizer-prod \
--name aks-yt-summarizer-prod
List node pools
az aks nodepool list \
--resource-group rg-yt-summarizer-prod \
--cluster-name aks-yt-summarizer-prod
Show cluster details
az aks show \
--resource-group rg-yt-summarizer-prod \
--name aks-yt-summarizer-prod
Azure Storage
Get connection string
az storage account show-connection-string \
--name stytsummprd \
--resource-group rg-yt-summarizer-prod
List storage accounts
az storage account list \
--resource-group rg-yt-summarizer-prod
Check blob containers
az storage container list \
--account-name stytsummprd \
--connection-string "<connection-string>"
Azure Key Vault
Get secret value
az keyvault secret show \
--name OpenAI-ApiKey \
--vault-name kv-yt-summarizer \
--query value \
--output tsv
List secrets (names only)
az keyvault secret list \
--vault-name kv-yt-summarizer \
--query "[].name"
Check secret expiration
az keyvault secret show \
--name <secret-name> \
--vault-name kv-yt-summarizer \
--query "{name:name, expires:attributes.expires}"
Resource Groups
List resources in group
az resource list \
--resource-group rg-yt-summarizer-prod \
--output table
Show resource group info
az group show \
--name rg-yt-summarizer-prod
Validation Patterns
Check if image exists before deployment
if az acr repository show-tags \
--name acrytsummprdci \
--repository yt-summarizer-api \
--query "contains(@, 'pr-110')" \
--output tsv; then
echo "Image exists"
else
echo "Image not found"
fi
Verify AKS cluster health
az aks get-credentials \
--resource-group rg-yt-summarizer-prod \
--name aks-yt-summarizer-prod
kubectl get nodes
kubectl get pods --all-namespaces
Best Practices
- Always specify resource group explicitly to avoid accidents
- Use
--output tsvfor scripting and piping - Use
--queryto filter results and reduce output - Validate before acting - check if resources exist first
- Never commit secrets - use Key Vault references instead