Share via

Way to test virtual nodes usage in AKS

Varma 1,560 Reputation points
2026-03-13T09:37:48.68+00:00

I want to test virtual nodes usage , is there any that i can create that scenario in my own lab before takes to prod.

if yes please suggest

Azure Kubernetes Service
Azure Kubernetes Service

An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.

0 comments No comments

3 answers

Sort by: Most helpful
  1. Varma 1,560 Reputation points
    2026-03-31T07:25:46.68+00:00

    Hi HImanshu

    ANy update i responded in private?


  2. Himanshu Shekhar 5,225 Reputation points Microsoft External Staff Moderator
    2026-03-13T09:44:50.1733333+00:00

    Varma - Yes, you can safely test AKS Virtual Nodes usage in your own lab environment before rolling it out to production. Microsoft fully supports lab and POC testing for Virtual Nodes using Azure Kubernetes Service (AKS) with Azure Container Instances (ACI).

    1. Create a non‑production AKS cluster with Virtual Nodes enabled
      Virtual Nodes are designed exactly for this use case burst testing and validation and can be enabled on a small AKS cluster that uses Azure CNI networking. This allows pods to run on ACI-backed virtual nodes without adding VM node pools. For creating and configuring an Azure Kubernetes Services (AKS) cluster to use virtual nodes- [learn.microsoft.com]

    2. Use a lightweight, stateless workload for testing
    Deploy a simple container (for example, a NGINX or hello‑world app) and explicitly schedule it onto the virtual node using node Selector and tolerations. This validates scheduling, networking, and pod startup behavior without impacting cost or complexity.

    1. Simulate burst scenarios intentionally
      Increase pod replicas or resource requests (CPU/memory) to force pods onto Virtual Nodes. This is the recommended way to validate on‑demand scale‑out behavior and confirm ACI quota readiness in your region. [techcommun...rosoft.com]
    2. Monitor usage and cost signals
      Use Azure Monitor / Container Insights to confirm:
    • Pods are running on virtual‑kubelet nodes
    • CPU/memory usage aligns with expectations

    No unexpected scheduling failures
    This mirrors production behavior without VM provisioning delays. [learn.microsoft.com]

    Important Lab Limitations to Validate

    • Virtual Nodes support Linux pods only
    • DaemonSets and some Kubernetes features are not supported
    • Persistent volumes have limitations (Azure Files only, inline mode)
      These constraints should be validated during lab testing to avoid surprises in production. [learn.microsoft.com]

    Microsoft Guidance (Recommended Reading) - Use Virtual Nodes with AKS - Microsoft Learn: AKS Virtual Nodes

    If you have any further queries, let me know. If the information is helpful, please click on Upvote and Accept Answer on it.


  3. Q&A Assist
    2026-03-13T09:38:13.9633333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    Yes, virtual nodes can be fully tested in a lab AKS cluster before using them in production. The process is:

    1. Prepare the subscription
      • Ensure the ACI resource provider is registered:
             az provider list --query "[?contains(namespace,'Microsoft.ContainerInstance')]" -o table
        
      • If Microsoft.ContainerInstance is NotRegistered, register it:
             az provider register --namespace Microsoft.ContainerInstance
        
    2. Create a resource group (lab environment)
      Example with Azure CLI:
         az group create --name myResourceGroup --location eastus
      
    3. Create an AKS cluster with virtual nodes enabled
      Using Azure portal:
      • Go to Create a resourceContainersAzure Kubernetes Service (AKS)Create.
      • On Basics, choose subscription, resource group (for example myResourceGroup), cluster name (for example myAKSCluster), region, and Kubernetes version.
      • Go to Next: Node pools and select Enable virtual nodes.
      • Select Review + create, then Create.
      This creates an AKS cluster with advanced networking (Azure CNI) and a delegated subnet for virtual nodes.
    4. Deploy a sample app to the virtual node
      • In Azure Cloud Shell or any kubectl environment, create virtual-node.yaml as shown in the docs (it must include a nodeSelector and toleration so the pod schedules on the virtual node).
      • Apply it:
             kubectl apply -f virtual-node.yaml
        
      • Verify the pod is running on the virtual node and has an internal IP:
             kubectl get pods -o wide
        
        Example output:
             NAME                            READY   STATUS    RESTARTS   AGE   IP           NODE
             aci-helloworld-...             1/1     Running   0          4m    10.241.0.4   virtual-node-aci-linux
        
    5. Test connectivity to the pod on the virtual node
      • Start a temporary test pod in the same AKS cluster:
             kubectl run -it --rm testvk --image=mcr.microsoft.com/dotnet/runtime-deps:6.0
        
      • Inside the pod, install curl:
             apt-get update && apt-get install -y curl
        
      • Curl the internal IP of the sample pod (replace with the IP from kubectl get pods -o wide):
             curl -L http://10.241.0.4
        
      • You should see the demo “Welcome to Azure Container Instances!” HTML output, confirming virtual node networking works.
      • Exit the test pod (it will be deleted):
             exit
        
    6. (Optional) Test image pulls from ACR
      • If using images from Azure Container Registry, configure a Kubernetes image pull secret as virtual nodes cannot use integrated Microsoft Entra service principal authentication. Without a secret, pods on virtual nodes will fail with HTTP response status code 400 error code "InaccessibleImage".
    7. Clean up the lab
      • Delete the sample app:
             kubectl delete -f virtual-node.yaml
        
      • Disable the virtual-node addon if desired:
             az aks disable-addons --resource-group myResourceGroup --name myAKSCluster --addons virtual-node
        
      • Optionally delete the resource group to remove all lab resources.

    This lab flow lets you validate scheduling, networking, and image pulling for virtual nodes before moving the pattern to production.


    References:

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.