【问题标题】:Azure Kubernetes Error when running "az aks get-credentials --resource-group AKSResourceGroupName --name AKSClusterName" command运行“az aks get-credentials --resource-group AKSResourceGroupName --name AKSClusterName”命令时出现 Azure Kubernetes 错误
【发布时间】:2022-01-27 11:42:43
【问题描述】:

运行此命令时出现此错误 (ResourceGroupNotFound)

错误信息:-

az aks get-credentials --resource-group AKSResourceGroupName --name AKSClusterName (ResourceGroupNotFound) 找不到资源组“AKSResourceGroupName”。 代码:ResourceGroupNotFound 消息:找不到资源组“AKSResourceGroupName”。

【问题讨论】:

  • AKSResourceGroupName 替换为您的资源组的名称......与集群名称相同。

标签: azure kubernetes


【解决方案1】:

az aks get-credentials 命令用于 获取托管 Kubernetes 集群的访问凭据。

例子:

az aks get-credentials --name MyManagedCluster --resource-group MyResourceGroup

nameresource-group 是必需参数,您应在其中提供托管集群的名称和资源组的名称。

【讨论】:

    【解决方案2】:

    首先,请检查您的订阅并选择正确的订阅:

    az account list --output table    
    az account set --subscription <name or id>
    

    那么你做的一切都是正确的:

    az aks get-credentials --name AKSClusterName --resource-group AKSResourceGroupName
    

    【讨论】:

      猜你喜欢
      • 2021-05-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-10-30
      • 1970-01-01
      • 2021-01-08
      • 2020-02-05
      • 2021-06-11
      相关资源
      最近更新 更多