Deploy from Azure Container Registry (ACR) to VideoSDK Cloud
This guide walks you through building, pushing, and deploying an agent container image stored in Azure Container Registry (ACR) to VideoSDK Agent Cloud.
You will:
- Build your Docker image with the VideoSDK CLI.
- Push the image to Azure Container Registry.
- Create an image pull secret in VideoSDK Cloud for ACR.
- Deploy your agent using the ACR image and image pull secret.
Prerequisites
- A working agent project with a
Dockerfile. - Azure account with access to an ACR registry.
- Azure CLI installed and logged in.
- VideoSDK CLI installed and authenticated.
1. Build Image with VideoSDK CLI
Use the videosdk agent build command to build your Docker image.
videosdk agent build \
--image myregistry.azurecr.io/my-agent:latest
Replace
myregistrywith your ACR registry name andmy-agentwith your repository name.
2. Push Image to ACR
Login to ACR and push the built image.
# Login to ACR
az acr login --name myregistry
# Push using VideoSDK CLI
videosdk agent push \
--image myregistry.azurecr.io/my-agent:latest \
--server myregistry.azurecr.io
3. Create Image Pull Secret for ACR
To allow VideoSDK Cloud to pull your private image, you need to create an image pull secret with your ACR credentials.
Obtaining ACR Credentials
You can use either an Admin User or a Service Principal:
-
Admin User (Simplest):
- Go to the Azure Portal > Container Registries > Select your registry.
- Under Settings, select Access keys.
- Ensure Admin user is enabled.
- Use the Registry name as
-u(username) and one of the passwords as-p.
-
Service Principal (Recommended):
- Create a Service Principal with
AcrPullpermissions. - Use the Application (client) ID as
-u(username) and the Client Secret as-p(password).
- Create a Service Principal with
Create the Secret
videosdk agent image-pull-secret my-acr-secret \
--server myregistry.azurecr.io \
-u myusername \
-p mypassword
Replace
myusernameandmypasswordwith the values obtained above.
4. Deploy Agent Using ACR Image
Now deploy your agent, referencing both the ACR image and the image pull secret you just created.
videosdk agent deploy \
--image myregistry.azurecr.io/my-agent:latest \
--image-pull-secret my-acr-secret \
--min-replica 1 \
--max-replica 3
Your agent will now run on VideoSDK Cloud using the image stored in Azure Container Registry.
Got a Question? Ask us on discord

