【问题标题】:Problem with Azure in Microsoft learning path module (Kubernetes)Microsoft 学习路径模块 (Kubernetes) 中的 Azure 问题
【发布时间】:2022-06-14 05:24:56
【问题描述】:

我只是在做微软课程的这个模块:

https://docs.microsoft.com/en-us/learn/modules/microservices-aspnet-core/

我创建了一个 azure 订阅并尝试运行第 2 单元中给出的脚本。 控制台中发生了一些事情,但在某些时候它显示如下:

Getting credentials for AKS...
(ResourceNotFound) The Resource 'Microsoft.ContainerService/managedClusters/eshop-learn-aks' under resource group 'eshop-learn-rg' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix
Code: ResourceNotFound
Message: The Resource 'Microsoft.ContainerService/managedClusters/eshop-learn-aks' under resource group 'eshop-learn-rg' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix

Installing NGINX ingress controller
error: You must be logged in to the server (the server has asked for the client to provide credentials)
error: You must be logged in to the server (the server has asked for the client to provide credentials)
error: You must be logged in to the server (the server has asked for the client to provide credentials)

Getting load balancer public IP

 > kubectl get svc -n ingress-nginx -o json | jq -r -e '.items[0].status.loadBalancer.ingress[0].ip // empty'

error: You must be logged in to the server (the server has asked for the client to provide credentials)
Waiting for load balancer IP...

我做错了吗?严格按照说明操作。

编辑: 我认为问题在于 VM,而不是 AKS。

> az aks create -n eshop-learn-aks -g eshop-learn-rg --node-count 1 --node-vm-size Standard_D2_v5 --vm-set-type VirtualMachineScaleSets -l centralus --enable-managed-identity --generate-ssh-keys -o json

ERROR: (BadRequest) The VM size of AgentPoolProfile:nodepool1 is not allowed in your subscription in location 'centralus'.

【问题讨论】:

  • 这也发生在我身上...

标签: azure kubernetes .net-core microservices


【解决方案1】:

您需要登录:

az login
az account set --subscription <YOUR SUB ID>
az aks get-credentials --resource-group <AKS RG> --name <AKS NAME>

【讨论】:

  • az aks get-credentials --resource-group --name 在资源下给出 ResourceNotFound 错误“资源 'Microsoft.ContainerService/managedClusters/eshop-learn-aks'找不到组“eshop-learn-rg””
【解决方案2】:

“CentralUS”位置不接受您拥有的订阅类型的新 VM。 您需要使用其他位置。

为此,您需要在执行 wget 之前在 bash shell 中声明一个变量“defaultRegion”(例如:declare defaultRegion=eastus

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-10-23
    • 1970-01-01
    • 2011-12-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多