Skip to main content

Azure

Deploy agentgateway on Microsoft Azure

Run agentgateway on Azure to leverage Azure OpenAI, AKS, and Azure services.

Deployment options

Azure Kubernetes Service (AKS)

For AKS deployments, use Agentgateway on Kubernetes which provides native Kubernetes Gateway API support, dynamic configuration, and MCP service discovery.

Deploy on AKS

Azure Container Apps

Run agentgateway as a serverless container.

az containerapp create \
--name agentgateway \
--resource-group my-rg \
--environment my-env \
--image cr.agentgateway.dev/agentgateway:latest \
--target-port 3000 \
--ingress external \
--secrets openai-key=secretref:openai-api-key \
--env-vars AZURE_OPENAI_ENDPOINT=https://my-resource.openai.azure.com

Azure integrations

IntegrationPurpose
Azure OpenAIAccess GPT-4 and other models
Azure Key VaultSecure API key storage
Azure Application GatewayLoad balancing with WAF
Azure MonitorLogs and metrics
Azure Application InsightsDistributed tracing

Azure role assignments

Assign roles to the managed identity:

# Get the managed identity principal ID
PRINCIPAL_ID=$(az identity show --name agentgateway-identity \
--resource-group my-rg --query principalId -o tsv)

# Grant Azure OpenAI access
az role assignment create \
--assignee $PRINCIPAL_ID \
--role "Cognitive Services OpenAI User" \
--scope /subscriptions/<sub-id>/resourceGroups/my-rg/providers/Microsoft.CognitiveServices/accounts/my-openai

# Grant Key Vault access
az role assignment create \
--assignee $PRINCIPAL_ID \
--role "Key Vault Secrets User" \
--scope /subscriptions/<sub-id>/resourceGroups/my-rg/providers/Microsoft.KeyVault/vaults/my-vault

Learn more