Events
17 Mar, 9 pm - 21 Mar, 10 am
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
High performance compute workloads often involve large images, which can cause long image pull times and slow down your workload deployments. Artifact Streaming on AKS allows you to stream container images from Azure Container Registry (ACR) to AKS. AKS only pulls the necessary layers for initial pod startup, reducing the time it takes to pull images and deploy your workloads.
Artifact Streaming can reduce time to pod readiness by over 15%, depending on the size of the image, and it works best for images <30GB. Based on our testing, we saw reductions in pod start-up times for images <10GB from minutes to seconds. If you have a pod that needs access to a large file (>30GB), then you should mount it as a volume instead of building it as a layer. This is because if your pod requires that file to start, it congests the node. Artifact Streaming isn't ideal for read heavy images from your filesystem if you need that on startup. With Artifact Streaming, pod start-up becomes concurrent, whereas without it, pods start in serial.
This article describes how to enable the Artifact Streaming feature on your AKS node pools to stream artifacts from ACR.
Important
AKS preview features are available on a self-service, opt-in basis. Previews are provided "as is" and "as available," and they're excluded from the service-level agreements and limited warranty. AKS previews are partially covered by customer support on a best-effort basis. As such, these features aren't meant for production use. For more information, see the following support articles:
Note
Artifact Streaming is only supported on Ubuntu 22.04, Ubuntu 20.04, and Azure Linux node pools. Windows node pools aren't supported.
Install the aks-preview
CLI extension using the az extension add
command.
az extension add --name aks-preview
Update the extension to ensure you have the latest version installed using the az extension update
command.
az extension update --name aks-preview
Register the ArtifactStreamingPreview
feature flag in your subscription using the az feature register
command.
az feature register --namespace Microsoft.ContainerService --name ArtifactStreamingPreview
Enablement on ACR is a prerequisite for Artifact Streaming on AKS. For more information, see Artifact Streaming on ACR.
Create an Azure resource group to hold your ACR instance using the az group create
command.
az group create --name myStreamingTest --location westus
Create a new premium SKU Azure Container Registry using the az acr create
command with the --sku Premium
flag.
az acr create --resource-group myStreamingTest --name mystreamingtest --sku Premium
Configure the default ACR instance for your subscription using the az configure
command.
az configure --defaults acr="mystreamingtest"
Push or import an image to the registry using the az acr import
command.
az acr import --source docker.io/jupyter/all-spark-notebook:latest --repository jupyter/all-spark-notebook:latest
Create a streaming artifact from the image using the az acr artifact-streaming create
command.
az acr artifact-streaming create --image jupyter/all-spark-notebook:latest
Verify the generated Artifact Streaming using the az acr manifest list-referrers
command.
az acr manifest list-referrers --name jupyter/all-spark-notebook:latest
Create a new node pool with Artifact Streaming enabled using the az aks nodepool add
command with the --enable-artifact-streaming
.
az aks nodepool add \
--resource-group myResourceGroup \
--cluster-name myAKSCluster \
--name myNodePool \
--enable-artifact-streaming
Update an existing node pool to enable Artifact Streaming using the az aks nodepool update
command with the --enable-artifact-streaming
.
az aks nodepool update \
--resource-group myResourceGroup \
--cluster-name myAKSCluster \
--name myNodePool \
--enable-artifact-streaming
Now that you enabled Artifact Streaming on a premium ACR and connected that to an AKS node pool with Artifact Streaming enabled, any new pod deployments on this cluster with an image pull from the ACR with Artifact Streaming enabled will see reductions in image pull times.
Check if your node pool has Artifact Streaming enabled using the az aks nodepool show
command.
az aks nodepool show --resource-group myResourceGroup --cluster-name myAKSCluster --name myNodePool --query artifactStreamingProfile
In the output, check that the Enabled
field is set to true
.
This article described how to enable Artifact Streaming on your AKS node pools to stream artifacts from ACR and reduce image pull time. To learn more about working with container images in AKS, see Best practices for container image management and security in AKS.
Azure Kubernetes Service feedback
Azure Kubernetes Service is an open source project. Select a link to provide feedback:
Events
17 Mar, 9 pm - 21 Mar, 10 am
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowTraining
Module
Guided Project - Deploy applications to Azure Kubernetes Service - Training
Welcome to this interactive skills validation experience. Completing this module helps prepare you for the Deploy and manage containers with Azure Kubernetes Service assessment.
Certification
Microsoft Certified: Azure Data Engineer Associate - Certifications
Demonstrate understanding of common data engineering tasks to implement and manage data engineering workloads on Microsoft Azure, using a number of Azure services.