Reading Time: 3 minutes
Share:
Twitter
LinkedIn
Facebook
Reddit
Whatsapp
Follow by Email

Microsoft are doing an amazing job updating Azure Kubernetes Service (AKS) with the release on 18/05/2020 Gen 2 VM’s came into public preview. Below I am going to quickly explain what gen 2 VM’s are and the benefits and then walkthrough enabling the new feature and creating a cluster using them.

Please not as the feature is in preview, do not use it for production workloads and the below steps may change when the feature goes GA (Generally Available).

What are Gen 2 VM’s and what benefits do they bring.

Generation 2 VM’s in Azure are just like the ones you find in Hyper-V back in Windows Server 2012 r2.  They use the new UEFI-based boot architecture which lets you build VM’s up to 12TB in size and have OS disks exceeding 2TB.  Having Gen 2 VM’s in Azure makes migration from on-premises estates a lot easier.

To read more about Gen 2 VM’s and Azure support, have a look at this.

Time to build the cluster!

Before you can create the cluster, you have a few steps to complete first.

Firstly, you are going to need to register the Gen 2 VM preview feature using the az feature register command:

az feature registering

It can take some time for the feature to register. To check its status, you can use the az feature show command:

az feature registered

Now that the feature is registered, it’s time to re-register the AKS namespace provider. To do this you need to use the az provider register command:

az provider register

Now you are ready to build the cluster

But first you need to create a resource group. You will use the az group create command for this:

az group create

Below is a simple one liner to build the AKS cluster with a lot of defaults. The bit of interest in the az aks create command is the –aks-custom-headers switch with the parameter usegen2vm=true:

Results from az aks create

You can see that its running as a gen 2 VM via the Azure portal. You will need to navigate to the Virtual Machine Scale Set (VMSS) for the node pool. It should be under the resource group MC_aks_aks_eastus. In here click on Operating system on the left.

You will see that the image reference stats gen2. It is also using the 1804 version of ubuntu which is also in preview.

VMSS blade showing gen 2

All in all

I hope you found this helpful and are looking forward to this new feature coming to AKS. If you have any questions or comments please reach out.

Share:
Twitter
LinkedIn
Facebook
Reddit
Whatsapp
Follow by Email
Categories: AKSAzure

Pixel Robots.

I’m Richard Hooper aka Pixel Robots. I started this blog in 2016 for a couple reasons. The first reason was basically just a place for me to store my step by step guides, troubleshooting guides and just plain ideas about being a sysadmin. The second reason was to share what I have learned and found out with other people like me. Hopefully, you can find something useful on the site.

0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *