Kubernetes in Azure in multiple subnets and/or availability zones

2/1/2018

I want to deploy a Kubernetes cluster in Azure. Do you know, if it is possible to configure it in a way, that each new machine in scaling set is deployed in another subnet, or even AZ (they have AZs in some regions already)?

Thanks!

-- pawel.kalisz
azure
high-availability
kubernetes

3 Answers

12/19/2018

as fair as i can tell, at this point in time, there is not automated way to achieve a multizone k8s setup out of the box with AKS

https://feedback.azure.com/forums/914020-azure-kubernetes-service-aks/suggestions/36071860-support-multiple-availability-zones-for-ha-high-a

regarding scaling sets, if by that you are referring to node pools, that is also not supported right now

https://feedback.azure.com/forums/914020-azure-kubernetes-service-aks/suggestions/34917127-support-multiple-node-pool

-- Alberto
Source: StackOverflow

2/1/2018

This is confusing on many levels. First of all, why would you want each agent node in a different subnet, that does offer no additional high availability but adds complexity (which is something you always want to reduce). Secondly, you are talking about scale sets, which are not part of kubernetes in Azure, at least at this point in time.

From what I know you cannot deploy kubernetes agent nodes in different subnets (ACS engine doesnt support that).

I dont know about availability zones support, but I suspect that this is not yet possible with ACS. But you can take a look at AKS, which is a managed kubernetes offering, they take care of redundancy for you.

-- 4c74356b41
Source: StackOverflow

3/29/2019

https://github.com/Azure/aks-engine/blob/1b082728b0a68c695dc10af17a191ef371919756/examples/kubernetes-zones/README.md

I can also confirm that aks will automatically deploy across different zones (zone 0,1) even if you didn't specify this.... the command to check this:

    kubectl get nodes --show-labels
NAME                               STATUS   ROLES    AGE   VERSION   LABELS
k8s-master-38488883-0              Ready    master   20h   v1.13.4   beta.kubernetes.io/arch=amd64,beta.kubernetes.io/instance-type=Standard_B2ms,beta.kubernetes.io/os=linux,failure-domain.beta.kubernetes.io/region=westeurope,failure-domain.beta.kubernetes.io/zone=1,kubernetes.azure.com/cluster=,kubernetes.io/hostname=k8s-master-38488883-0,kubernetes.io/role=master,node-role.kubernetes.io/master=
k8s-master-38488883-1              Ready    master   20h   v1.13.4   beta.kubernetes.io/arch=amd64,beta.kubernetes.io/instance-type=Standard_B2ms,beta.kubernetes.io/os=linux,failure-domain.beta.kubernetes.io/region=westeurope,failure-domain.beta.kubernetes.io/zone=0,kubernetes.azure.com/cluster=,kubernetes.io/hostname=k8s-master-38488883-1,kubernetes.io/role=master,node-role.kubernetes.io/master=
k8s-master-38488883-2              Ready    master   20h   v1.13.4   beta.kubernetes.io/arch=amd64,beta.kubernetes.io/instance-type=Standard_B2ms,beta.kubernetes.io/os=linux,failure-domain.beta.kubernetes.io/region=westeurope,failure-domain.beta.kubernetes.io/zone=0,kubernetes.azure.com/cluster=,kubernetes.io/hostname=k8s-master-38488883-2,kubernetes.io/role=master,node-role.kubernetes.io/master=
k8s-permpool-38488883-vmss000000   Ready    agent    20h   v1.13.4   agentpool=permpool,beta.kubernetes.io/arch=amd64,beta.kubernetes.io/instance-type=Standard_E4s_v3,beta.kubernetes.io/os=linux,failure-domain.beta.kubernetes.io/region=westeurope,failure-domain.beta.kubernetes.io/zone=0,kubernetes.azure.com/cluster=,kubernetes.io/hostname=k8s-permpool-38488883-vmss000000,kubernetes.io/role=agent,node-role.kubernetes.io/agent=,storageprofile=managed,storagetier=Premium_LRS
k8s-permpool-38488883-vmss000001   Ready    agent    20h   v1.13.4   agentpool=permpool,beta.kubernetes.io/arch=amd64,beta.kubernetes.io/instance-type=Standard_E4s_v3,beta.kubernetes.io/os=linux,failure-domain.beta.kubernetes.io/region=westeurope,failure-domain.beta.kubernetes.io/zone=1,kubernetes.azure.com/cluster=,kubernetes.io/hostname=k8s-permpool-38488883-vmss000001,kubernetes.io/role=agent,node-role.kubernetes.io/agent=,storageprofile=managed,storagetier=Premium_LRS
-- Nic Swart
Source: StackOverflow