<p>I am working on Azure Kubernetes service. I am creating AKS through portal successfully. But, I need to do it through the ARM Templates.</p>

<p>How to create AKS with help of ARM Templates? </p>

<p>For this, I followed <a href="https://github.com/neumanndaniel/armtemplates/blob/master/container/aks.json" rel="nofollow noreferrer">link</a></p>

<p>But, here am receiving an issue like:</p>

<blockquote>
  <p>Code    : InvalidTemplate</p>
  
  <p>Message : Deployment template validation failed: 'The template
  resource 
            'AKSsubnet/Microsoft.Authorization/36985XXX-XXXX-XXXX-XXXX-5fb6b7ebXXXX'
  for type 
            'Microsoft.Network/virtualNetworks/subnets/providers/roleAssignments'
  at line '53' and column '9' has incorrect segment lengths. A 
            nested resource type must have identical number of segments as its resource name. A root resource type must have segment length 
            one greater than its resource name. Please see <a href="https://aka.ms/arm-template/#resources" rel="nofollow noreferrer">https://aka.ms/arm-template/#resources</a> for usage details.'.</p>
</blockquote>

Mani
<p>Old thread but here is why the AKS Advanced Networking ARM Template is not working for you.</p>

<p>One of the steps in the deployment assigns the SP as a contributor to the newly created AKS subnets so that the SP can work its advanced networking magic.</p>

<p>In order to assign a role in a RG one needs to have Owner permissions on that RG. </p>
