ACS icon indicating copy to clipboard operation
ACS copied to clipboard

Cannot create Kubernetes cluster in a differnet vnet/subnet

Open VipinPS opened this issue 7 years ago • 9 comments

Unable to create azure container services (Kubernetes) on a specific VNET using flags '--master-vnet-subnet-id' & ' --agent-vnet-subnet-id' , Look like it's creating it's on VNET other than using the specified ones.

Trying to spinup new cluster through Azure-CLI uisng following command :

$ az acs create --orchestrator-type kubernetes --resource-group GROUP1--name NAME1 --master-vnet-subnet-id "/subscriptions/<id>/resourceGroups/<resource group name>/providers/Microsoft.Network/virtualNetworks/<vnet name>/subnets/<subnet name>" --generate-ssh-keys

VipinPS avatar Nov 13 '17 06:11 VipinPS

You are missing some of the required parameters for custom vnet. You also need to specify the agent vnet subnet, --agent-vnet-subnet-id, and what address to put the first master ip at, --master-first-consecutive-static-ip.

We should be validating this to make sure you are specifying all the values you need to. I'll look more into that side of this

JackQuincy avatar Nov 13 '17 19:11 JackQuincy

Have tried it , But no luck. Will Azure VNET plugin helps?

VipinPS avatar Nov 14 '17 11:11 VipinPS

That could help but it wouldn't fix this. So it is still provisioning a new vnet and putting the machines in it? What region are you trying to deploy into? Vnet is only supported in our preview regions. https://github.com/Azure/ACS/blob/master/announcements/2017-08-04_additional_regions.md

JackQuincy avatar Nov 14 '17 17:11 JackQuincy

Yes, It's provisioning new vnet , not using the original vnet/subnet given.

I forget to mention it , ACS is hosted in westcentralus which is in one of the supported regions.

VipinPS avatar Nov 15 '17 03:11 VipinPS

Hi, Could you update supported regions? I have the same problem as eynet, anyone has resolved?

Thx

gmartinoreply avatar Jan 22 '18 16:01 gmartinoreply

Hi, I think I have the same problem. I am using terraform with https://github.com/bhood4/terraform-provider-azurerm fork . I have added vnet_subnet_id on master_profile and agent_profile, and now added master_profile.first_consecutive_static_ip. I get this error back from the go sdk call:

{"code":"DeploymentFailed", "message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-debug for usage details.", "details":[ {"code":"BadRequest", "message":"{\r\n "error": {\r\n "code": "InvalidTemplate",\r\n "message": "Unable to process template language expressions for resource '/subscriptions/4a9b7bf9-795f-47ed-8a92-82356d4c5210/resourceGroups/mr-play-A_acsk8s_westus2/providers/Microsoft.Compute/virtualMachines/15216k8s9001' at line '1' and column '24520'. 'The template variable 'subnet' is not found. Please see https://aka.ms/arm-template/#variables for usage details.'"\r\n }\r\n}"}

bhood4 avatar Jan 25 '18 17:01 bhood4

Doesn't work for me , I run: '``` az acs create --orchestrator-type kubernetes -g rn-jupyterhub-dev-rg-ne --master-vnet-subnet-id "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/dev-vnet-rg-ne/providers/Microsoft.Network/virtualNetworks/dev-vnet/subnets/k8s-master-dev-subnet" --agent-vnet-subnet-id "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/dev-vnet-rg-ne/providers/Microsoft.Network/virtualNetworks/dev-vnet/subnets/k8s-agent-dev-subnet" --master-first-consecutive-static-ip "10.12.24.5" --name rn-jupyterhub-dev-k8s'

but the vms are deployed to vnet 'k8s-vnet-xxxxxxxx' in the 'k8s-subnet', in North Europe

rtcn2 avatar Jan 31 '18 16:01 rtcn2

FYI this is only available in certain regions so if its not working that would be why.

hafizullah avatar Mar 15 '18 14:03 hafizullah

When specifying vnet's I get the following error -

at line '1' and column '24298'. 'The template variable 'subnet' is not found

I looked in the generated ARM template from the ACS process and a variable subnet is referenced which doesn't exist. It looks like it should be feeding the master network CIDR into the CSE extension.

I am working in UKSOUTH which apparently should be supported. This looks like a bug in the way the ARM template is generated by ACS.

willwhite1 avatar Mar 21 '18 17:03 willwhite1