简体   繁体   English

如何通过 ARM 模板创建 Azure AKS 服务

[英]How to create an Azure AKS service through ARM Template

I am working on Azure Kubernetes service.我正在研究 Azure Kubernetes 服务。 I am creating AKS through portal successfully.我正在通过门户成功创建 AKS。 But, I need to do it through the ARM Templates.但是,我需要通过 ARM 模板来完成。

How to create AKS with help of ARM Templates?如何借助 ARM 模板创建 AKS?

For this, I followed link为此,我按照链接

But, here am receiving an issue like:但是,这里收到一个问题,如:

Code : InvalidTemplate代码:无效模板

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.消息:部署模板验证失败:“模板资源“AKSsubnet/Microsoft.Authorization/36985XXX-XXXX-XXXX-XXXX-5fb6b7ebXXXX”在“53”行和列的“Microsoft.Network/virtualNetworks/subnets/providers/roleAssignments”类型“9”的段长度不正确。 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.根资源类型的段长度必须比其资源名称大 1。 Please see https://aka.ms/arm-template/#resources for usage details.'.请参阅https://aka.ms/arm-template/#resources了解使用详情。'。

How to create AKS with help of ARM Templates?如何借助 ARM 模板创建 AKS?

One of the most direct methods, navigate to creating AKS page in the portal, fill the attributes, click Download a template for automation , then you will get the template.最直接的方法之一,在门户中导航到创建AKS页面,填写属性,单击Download a template for automation ,然后您将获得模板。

在此处输入图片说明

You could test the template in the Custom deployment , it will work fine.您可以在自定义部署中测试模板,它会正常工作。

在此处输入图片说明

Old thread but here is why the AKS Advanced Networking ARM Template is not working for you.旧线程,但这就是 AKS 高级网络 ARM 模板不适合您的原因。

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.部署中的步骤之一将 SP 分配为新创建的 AKS 子网的参与者,以便 SP 可以发挥其高级网络魔法。

In order to assign a role in a RG one needs to have Owner permissions on that RG.为了在 RG 中分配角色,需要对该 RG 拥有所有者权限。

I suspect you have provided the incorrectly formatted string in the "name" field of the resource.我怀疑您在资源的“名称”字段中提供了格式不正确的字符串。 It should follow the pattern like this- "{resource-name}/Microsoft.Authorization/{role-assign-GUID}"它应该遵循这样的模式 - “{resource-name}/Microsoft.Authorization/{role-assign-GUID}”

More on this here- https://docs.microsoft.com/en-us/azure/role-based-access-control/role-assignments-template#resource更多关于这里 - https://docs.microsoft.com/en-us/azure/role-based-access-control/role-assignments-template#resource

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用ARM模板创建Azure Kubernetes服务(AKS) - How to Create Azure Kubernetes Service (AKS) using ARM Templates 没有使用 Azure 容器注册表 (ACR) 使用 ARM 模板创建 Azure AKS 集群的选项 - No option to Create Azure AKS cluster with Azure container registry (ACR) using ARM template 使用Azure ARM模板创建AKS群集并部署我的Kubernetes应用程序 - Use Azure ARM template to create an AKS cluster and deploy my Kubernetes application Azure 服务总线 Session 通过 ARM 模板启用订阅创建 - Azure Service Bus Session Enabled Subscription Creation through ARM template 如何在 ARM 模板中创建一个天蓝色的功能键? - how to create an azure function key in ARM template? 通过ARM模板创建Azure blob / fileshare容器 - Create Azure blob/fileshare container through ARM template 有没有办法使用 ARM 模板来创建 Azure 服务主体? - Is there a way to use ARM Template to create an Azure Service Principal? 如何在.Net SDK或PowerShell或ARM模板中使用自定义映像创建Azure批处理服务应用程序池 - How to create Azure Batch service Application pool with custom image in .Net SDK or PowerShell or ARM Template 如何在美国东部地区通过 ARM 模板在 Azure 中创建虚拟机数量? - How to create No of Virtual machines in Azure through ARM template in East US region? 如何使用 azure arm 模板创建 azure webjob? - How to create azure webjob using azure arm template?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM