Microsoft学习路径模块(Kubernetes)中的Azure问题

发布于 2025-02-01 00:49:56 字数 1861 浏览 1 评论 0原文

我只是在做Microsoft课程的模块:

https:/ /leawn.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而不是AK。

> 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'.

I am just doing this module of Microsoft course:

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

I created an azure subscription and tried to run the script given in unit 2.
Something is going on in the console, but at some point it shows something like this:

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...

Am I doing something wrong? Strictly followed instructions.

Edit:
I think problem is with VM, not 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'.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

黯淡〆 2025-02-08 00:49:57

您需要登录:

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

You need to log in :

az login
az account set --subscription <YOUR SUB ID>
az aks get-credentials --resource-group <AKS RG> --name <AKS NAME>
伴随着你 2025-02-08 00:49:57

“ Centralus”位置不接受您拥有的订阅类型的新VM。
您需要使用另一个位置。

为此,您需要在执行WGET之前,需要在bash shell中声明一个变量“ defaultregion”(ex。:声明defaultregion = eastus

The 'CentralUS' location doesn't accept new VM with the type of subscription you have.
You need to use another location.

To do that, you need to declare a variable 'defaultRegion' in the bash shell (ex.: declare defaultRegion=eastus) before executing wget

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文