none
AKS Update via Azure CLI: doesn't find resource RRS feed

  • Question

  • hi

    I've received an email today to update our Azure Kubernetes VMs to version 1.13.0 or 1.14.6 to close some security risk. Having never done this before, I've first installed the Azure CLI on Windows and am now trying to follow the upgrade-doks [1].

    However, when I run the following command (in powershell), I receive an error:

    az aks get-upgrades --resource-group myResourceGroup --name myVMName --output table

    Error:

    The Resource 'Microsoft.ContainerService/managedClusters/myVmName' under resource group 'myResourceGroup' was not found.

    Googling around showed me how to see the resources for a resource group:

    az resource list --resource-group myResourceGroup

    This showed me the expected list for that myResourceGroup, including an entry for myVmName. Also the subscription ID shown is correct. (Fields such as identity, kind, managedBy, plan, properties are all null). The type is shown as "Microsoft.Compute/virtualMachines".

    Does anyone have an idea what I am doing wrong? Could an old change (I am not aware of) in the resourcegroup name cause this issue?

    Is it correct that the path it looks for my Kubernetes VM is 'Microsoft.ContainerService/managedClusters/myVmName'?

    thank you!

    PS: Just to make sure: this is where I get the myVmName and myResourceGroup info from.

    [1] https://docs.microsoft.com/en-us/azure/aks/upgrade-cluster


    • Edited by casaout Wednesday, September 11, 2019 9:17 AM
    Wednesday, September 11, 2019 9:16 AM

Answers

  • Hello,

    When you create an AKS cluster, it is spanned across 2 resources groups. Check this FAQ document on this.

    The VM's related to AKS cluster are under the resource group which starts with MC_rg_region. You are probably checking in this blade. For upgrading AKS cluster, you have to select the AKS cluster directly in the resource group where you deployed.

    To upgrade follow the below steps:

    • Select 'Kubernetes Service' from All services.
    • Now select the AKS cluster you want to upgrade.
    • And go with the upgrade process as mentioned in the previous reply.


    Please let me know if you still need help on this.

    If the suggested answer has solved your issue, do click on "Mark as Answer" and “Vote as Helpful” on the post that helps you, this can be beneficial to other community members.

    Thanks.



    Thursday, September 12, 2019 5:12 AM
    Moderator

All replies

  • Hello,

    The document you are following to upgrade AKS cluster will work fine when you try in Azure CLI (bash terminal, you can use azure cloud shell).

    You can also upgrade AKS cluster from Azure portal as below:

    Select you AKS Cluster -> Under Settings -> select Upgrade -> select the Kubernetes version and click on Save.

    This will upgrade AKS to the selected version.

    If the suggested answer has solved your issue, do click on "Mark as Answer" and “Vote as Helpful” on the post that helps you, this can be beneficial to other community members.

    Thanks.


    Wednesday, September 11, 2019 10:10 AM
    Moderator
  • Hi Vikas

    Thank you for your quick response!

    From your screenshot I am actually wondering if I am not using the same service: below the title (that you redacted) it says "Kubernetes Service" in your instance, and for me it says "virtual machine". Hence, I also don't see the upgrade option)

    Is it possible it doesn't work since it's not actually a kubernetes service, but a VM so we have to access it differently? (what would the correct approach be in our case?)

    Also, how difficult would it be to migrate from kubernetes hosted in the VM service to the kubernetes service?

    thank you!

    Wednesday, September 11, 2019 1:57 PM
  • Hello,

    When you create an AKS cluster, it is spanned across 2 resources groups. Check this FAQ document on this.

    The VM's related to AKS cluster are under the resource group which starts with MC_rg_region. You are probably checking in this blade. For upgrading AKS cluster, you have to select the AKS cluster directly in the resource group where you deployed.

    To upgrade follow the below steps:

    • Select 'Kubernetes Service' from All services.
    • Now select the AKS cluster you want to upgrade.
    • And go with the upgrade process as mentioned in the previous reply.


    Please let me know if you still need help on this.

    If the suggested answer has solved your issue, do click on "Mark as Answer" and “Vote as Helpful” on the post that helps you, this can be beneficial to other community members.

    Thanks.



    Thursday, September 12, 2019 5:12 AM
    Moderator
  • hi Vikas

    Thank you very much! This worked very well. I've had to enable the log analytics service for the upgrade to work and restart the VM afterwards.

    Thanks again!

    Thursday, September 12, 2019 7:29 AM