Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Large container images can increase image pull time and delay workload deployment. Artifact Streaming allows you to stream container images from Azure Container Registry (ACR) to Azure Kubernetes Service (AKS). AKS only pulls the necessary layers for initial pod startup, reducing the time it takes to deploy your workloads.
This article describes how to enable and disable the Artifact Streaming feature on your AKS node pools to stream artifacts from ACR.
Prerequisites
- An Azure subscription. If you don't have an Azure subscription, you can create a free account.
- Enable Artifact Streaming on ACR.
- Azure CLI version 2.87.0 or later. Run
az --versionto find your version. If you need to install or upgrade, see Install Azure CLI. - This feature requires Kubernetes version 1.25 or later. To check your AKS cluster version, see Check for available AKS cluster upgrades.
- An existing AKS cluster with ACR integration. If you don't have one, you can create one using Authenticate with ACR from AKS.
- The Azure Kubernetes Service Contributor Role is required to modify node pool configurations.
Limitations
- Only images with Linux AMD64 architecture are supported.
- Windows-based container images and ARM64 images aren't supported.
- Only the AMD64 architecture is supported for multi-architecture images.
- Ubuntu based node pools in AKS must use Ubuntu version 20.04 or higher.
- Only Premium SKU ACR registries are supported.
- CMK (Customer-Managed Keys) registries aren't supported.
- Kubernetes
regcred, such asimagePullSecrets, isn't supported. Image pulls from ACR using non-Entra scope-mapped token credentials or ACR admin user credentials default to non-Artifact Streaming pulls, even if the node pool and image are enabled for streaming. - Artifact Streaming only supports image pulls by tag. Artifact Streaming works by resolving image pulls by tag to a streaming variant of the image. If image pulls are done by digest, you can't use Artifact Streaming.
Enable Artifact Streaming on ACR
Create an Azure resource group to hold your ACR instance using the
az group createcommand.az group create --name myStreamingTest --location westusCreate a new Premium SKU ACR using the
az acr createcommand with the--sku Premiumflag.az acr create --resource-group myStreamingTest --name mystreamingtest --sku PremiumConfigure the default ACR instance for your subscription using the
az configurecommand.az configure --defaults acr="mystreamingtest"Push or import an image to the registry using the
az acr importcommand.az acr import --source docker.io/jupyter/all-spark-notebook --repository jupyter/all-spark-notebookCreate a streaming artifact from the image using the
az acr artifact-streaming createcommand.az acr artifact-streaming create --image jupyter/all-spark-notebook:latestVerify the generated Artifact Streaming using the
az acr manifest list-referrerscommand.az acr manifest list-referrers --name jupyter/all-spark-notebook:latest
Enable Artifact Streaming on AKS
You can enable Artifact Streaming on new or existing node pools in your AKS cluster with ACR integration.
Note
If you don't have a Premium tier ACR integrated with your AKS cluster, you can't use Artifact Streaming on AKS.
Enable Artifact Streaming on a new node pool
Create a new AKS node pool with Artifact Streaming enabled using the az aks nodepool add command with the --enable-artifact-streaming flag.
az aks nodepool add \
--resource-group myResourceGroup \
--cluster-name myAKSCluster \
--name myNodePool \
--enable-artifact-streaming
Enable Artifact Streaming on an existing node pool
Enable Artifact Streaming on an existing AKS node pool using the az aks nodepool update command with the --enable-artifact-streaming flag.
az aks nodepool update \
--resource-group myResourceGroup \
--cluster-name myAKSCluster \
--name myNodePool \
--enable-artifact-streaming
Disable Artifact Streaming on an existing node pool
Disable Artifact Streaming on an existing AKS node pool using the az aks nodepool update command with the --disable-artifact-streaming flag.
az aks nodepool update \
--resource-group myResourceGroup \
--cluster-name myAKSCluster \
--name myNodePool \
--disable-artifact-streaming
Check Artifact Streaming enablement status
Check if Artifact Streaming is enabled on an AKS node pool using the az aks nodepool show command with the --query flag set to artifactStreamingProfile.
az aks nodepool show \
--resource-group myResourceGroup \
--cluster-name myAKSCluster \
--name myNodePool \
--query artifactStreamingProfile
In the output, check the Enabled field. true means Artifact Streaming is enabled, and false means Artifact Streaming is disabled.
Related content
This article describes how to enable and disable Artifact Streaming on your AKS node pools to stream artifacts from ACR and reduce deployment times. To learn more about working with container images in AKS, see Best practices for container image management and security in AKS.