Home > Kubernetes > Azure AKS default VM size cannot be changed

Azure AKS default VM size cannot be changed

Kubernetes is pushed by all the major cloud provider and Microsoft recently (well, end of 2017) rolled out managed Kubernetes, AKS. It is a great offering, but there are problems. This is to be expected from a product that is still in preview, but take care and expect a somewhat bumpy ride if you take the leap!

Create a new cluster, for example with:


az aks create --resource-group rgakstwe \
 --name akstwe \
 --node-count 2 \
 --ssh-key-value ~/.ssh/id_rsa.pub \
 --location westeurope

This creates two nodes with the default AKS VM size, at this point Standard_D1_v2. All is well, but what happens when you want to add persistent volumes? Unfortunately premium storage disks are available only for some VMs. In particular they are NOT available for Standard_D1_v2, so while it is possible to create a persistent volume claim it is not possible to run a deployment that uses it.

What to do? There is no az aks update command for changing the VM size. According to Microsoft the only way forward is to manually change the size for each individual VM. That works, but there is a problem: the default size will be used when the cluster is scaled, so if it scales down and then up again the manually tweaked nodes revert to the default VM size.

At present that is the way it is. When AKS exits preview and is rolled out for real there will be a way to change the default VM size, but for now it is important to think ahead as the only way to change the default which is used for scaling is to recreate the cluster.

In other words, plan ahead and don’t start too small.

Advertisements
Categories: Kubernetes
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: