Aci-Connector-Linux Pod for crashloopbackoff状态中的Azure AKS
尝试使用 azure kubernetes cluster 使用 terraform ,我试图设置虚拟节点时遇到了问题。
当我检查ACI-Connector-Linux的POD时,我会遇到以下错误:
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Pulled 41m (x50 over 4h26m) kubelet Container image "mcr.microsoft.com/oss/virtual-kubelet/virtual-kubelet:1.4.1" already present on machine
Warning BackOff 68s (x1222 over 4h26m) kubelet Back-off restarting failed container
我还授予了Azure Kubernetes群集的系统标识,使用此处的文档 - ,但我仍会遇到crressloopbackoff状态错误。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我终于修复了它。
该问题是由
aci-connector-linux
的过时文档引起的 - https://github.com/terraform-providers/terraform-providers/terraform-provider-provider-provider-provider-azurerm/blob/blob/master/master/master/examples/examples/kubernetes/kubernetes/kubernetes/kubernetes/acci_connector/acconnector/mainux/main.linux/main.tlin.tlin.linf 将角色分配给Azure Kubernetes群集的托管身份这是我修复它的方式:
Azure Kubernetes服务创建了节点资源组,该节点与Kubernetes群集的资源组分开。在节点资源组中,AKS为
aci-connector-linux
创建了托管身份。节点资源组的名称通常为mc_< kubernetesourcegroupname_kuberneteservicename-kubernetesresourcegroupegroupegroupegroupegrouplopation>
,因此,如果您的 strong> kubernetesresorcegroupnetesresourcegroupname> kertems myRecern 是my-test-cluster
,并且如果 kubernetesresourcegroupopocationwesteurope
,则节点资源组将为mc_myresourcegroup_my-test_my-test -cluster_westeurope
。您可以在资源组下查看Azure门户中的资源。接下来,您可以使用命令查看
aci-connector-linux
pod的日志来查看问题的根本原因:您将像这样输出:
您可以使用以下代码在 terraform 中对此进行修复:
您还可以使用下面的Azure CLI命令来实现此目标:
Note Note 中获得的ID。
是您在错误消息
ID
:对象(主) COM/HASHICORP/TERRAFORM-PROVIDER-ASURERM/essess/9733“ RER =“ Nofollow Noreferrer”> ACI Connector Linux应该导出与其附加的身份相关的身份
使用terraform创建具有“ systemAssigned”身份的AKS群集和aci_connector_linux profile启用启用不会导致创建虚拟节点
://cloud.netapp.com/blog/azure-cvo-blg-azure-kubernetes-service-tutorial-interial-integrate-integrate-aks-with-aci“ rel =“ nofollow noreferrer”> azure kubernetes服务tutorial tutorial:如何与Aks Intectate Aks ack aks ack aks act azure容器实例
I finally fixed it.
The issue was caused by the Outdated documentation for
aci-connector-linux
here - https://github.com/terraform-providers/terraform-provider-azurerm/blob/master/examples/kubernetes/aci_connector_linux/main.tf which assigns the role to the Managed identity of the Azure Kubernetes clusterHere's how I fixed it:
Azure Kubernetes Service creates Node resource group which is separate from the resource group for the Kubernetes Cluster. Within the Node resource group, AKS creates a Managed Identity for the
aci-connector-linux
. The name of the Node resource group is usuallyMC_<KubernetesResourceGroupName_KubernetesServiceName-KubernetesResourceGroupLocation>
, so if your KubernetesResourceGroupName isMyResourceGroup
and if the KubernetesServiceName ismy-test-cluster
and if the KubernetesResourceGroupLocationwesteurope
, then the Node resource group will beMC_MyResourceGroup_my-test-cluster_westeurope
. You can view the resources in the Azure Portal under Resource Groups.Next, you can view the root cause of the issue by viewing the logs of the
aci-connector-linux
pod using the command:And you will an output like this:
You can fix this in Terraform using the code below:
You can also achieve this using the Azure CLI command below:
Note: The Object (principal) ID is the ID that you obtained in the error message.
An example is this:
Resources:
Aci connector linux should export the identity associated to its addon
Using Terraform to create an AKS cluster with "SystemAssigned" identity and aci_connector_linux profile enabled does not result in a creation of a virtual node
Azure Kubernetes Service Tutorial: How to Integrate AKS with Azure Container Instances
Fail to configure a load balancer (AKS)