How can I remove an (old) virtual node from AKS?

Patrick Deubel 45 Reputation points
2024-01-08T13:25:55.8866667+00:00

Hi,

we have an AKS that is about 4 years old and is configured with Azure CNI networking and has one virtual node. Recently I upgraded the nodes of the cluster to the latest Kubernetes version (v1.27.3) and noticed the virtual node which has version "v1.25.0-vk-azure-aci-1.6.0". Upon some research we decided that we no longer need the virtual node and I would like to delete it. I followed the instructions from https://video2.skills-academy.com/en-us/azure/aks/virtual-nodes-cli#remove-virtual-nodes and the commands ran successfully, but the virtual node is still there.

Has anyone been successful with removing a virtual node from a K8s cluster?

Thanks in advance!

Azure Container Instances
Azure Container Instances
An Azure service that provides customers with a serverless container experience.
700 questions
Azure
Azure
A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.
1,037 questions
Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
2,103 questions
0 comments No comments
{count} votes

Accepted answer
  1. Ammar-Abdelqader01 1,156 Reputation points Microsoft Employee
    2024-01-08T13:56:17.8966667+00:00

    Hello @Patrick Deubel

    thank you for your question, I understand that you ran the command :

    az aks disable-addons --resource-group myResourceGroup --name myAKSCluster --addons virtual-node

    to remove the virtual node, but still, you can see it.

    the Virtual nodes running on a different AKS nodes environment, so it could take more time to fully delete.

    1- could you please run command: kubectl describe virtual-node Name.to get more details about the node and see if there are any events or statuses that indicate why it's still present

    2- if the virtual node is not needed, you can try manually deleting the node using kubectl delete node <virtual-node-name>.

    3- After attempting deletion, verify the node's status again with kubectl get nodes to see if it has been removed.

    If this has been helpful, please take a moment to accept answers as this helps increase the visibility of this question for other members of the Microsoft Q&A community. Thank you for helping to improve Microsoft Q&A!

    User's image

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

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