Change:
func (az *Cloud) getSubnet(virtualNetworkName string, subnetName string) (subnet network.Subnet, exists bool, err error) { var realErr error <ins> var rg string if len(az.VnetResourceGroup) > 0 { rg = az.VnetResourceGroup } else { rg = az.ResourceGroup } </ins> az.operationPollRateLimiter.Accept() glog.V(10).Infof("SubnetsClient.Get(%s): start", subnetName) <del> subnet, err = az.SubnetsClient.Get(az.ResourceGroup, virtualNetworkName, subnetName, "") </del> <ins> subnet, err = az.SubnetsClient.Get(rg, virtualNetworkName, subnetName, "") </ins> glog.V(10).Infof("SubnetsClient.Get(%s): end", subnetName) exists, realErr = checkResourceExistsFromError(err)

Discussion:
Is this a BUG REPORT or FEATURE REQUEST?: /kind bug What happened: I've created a Kubernetes CLuster on Azure using acs-engine. In order to be able to communicate within a private network (Azure Vnet) between k8s resources and other Azure resources I have used a custom VNet configuration which allows to specify the Azure VNet resource you want k8s to be deployed into (which was already existing and had already some resources). When I tried to create an internal load balancer service (see following yaml) Kubernetes tells me it fails to get the subnet he wants to use for the Azure internal load balancer resource (it's the same subnet that is used by k8s masters nodes, so it does exist). What you expected to happen: Azure internal load balancer resource created How to reproduce it (as minimally and precisely as possible): Environment: Kubernetes version (use ): 1.6.6 Cloud provider or hardware configuration: Azure OS (e.g. from /etc/os-release): 16.04.2 LTS (Xenial Xerus) Kernel (e.g. ): Linux k8s-master--0 4.4.0-83-generic -Ubuntu SMP Mon Jun 26 17:54:43 UTC 2017 x8664 x8664 x86_64 GNU/Linux
There are no sig labels on this issue. Please by: a sig: e.g., to notify the contributor experience sig, OR the label manually: e.g., to apply the label Note: Method 1 will trigger an email to the group. You can find the group list and label list . The in the method 1 has to be replaced with one of these: bugs, feature-requests, pr-reviews, test-failures, proposals
/sig azure /sig network
All right, I think I found the issue. K8s fails to find the subnet because in my case the VNet is not in the same resource group as the kubernetes. I'll try to make a patch to be able to configure the resource group of the VNet.
I still seem to be experiencing this problem using version 1.7.4; was it merged into the 1.7.x branch?
It has been, have you the vnetResourceGroup properties your the ?
I don't think so. I've provisioned the cluster using acs-engine.

Is the file just on the master node(s)?
definitely exists on both masters and agents, in /etc/kubernetes. Presumably both are used as masters and agents have different subnet configurations. I updated both to be safe. I've just experienced this issue myself on a fresh deployment to Azure using . Presumably acs-engine needs to be updated to populate the attribute from the attributes in the apimodel specification JSON. Specifically they can be found here: Does anyone know if this has been documented as an issue in acs-engine already?
We also encountered this issue. Can you provide an example about how to add into ?
Thanks for the reply. Can you provide more details? In our case, we use a json file like below to generate and by . After that, we can deploy the cluster by . Do you have any idea about this?
It looks like this was fixed in a PR to acs-engine last week: Thanks ! There hasn't been a binary release since then, so you'd have to clone the acs-engine repo and build from source to benefit from the fix. - as a workaround for a cluster that's already been deployed, you need to SSH to each master and worker and edit as suggested. Specifically: