Azure-docs: error: --spot_max_price can only be set when --priority is Spot

Created on 25 Feb 2020  Â·  8Comments  Â·  Source: MicrosoftDocs/azure-docs

I get the following error when running the tutorial step by step from the Azure Cloud Shell:

sean@Azure:~$ az version
This command is in preview. It may be changed/removed in a future release.
{
"azure-cli": "2.1.0",
"azure-cli-command-modules-nspkg": "2.0.3",
"azure-cli-core": "2.1.0",
"azure-cli-nspkg": "3.0.4",
"azure-cli-telemetry": "1.0.4",
"extensions": {
"aks-preview": "0.4.30"
}
}

sean@Azure:~$ az aks nodepool add \
> --resource-group myResourceGroup \
> --cluster-name myAKSCluster \
> --os-type Windows \
> --name npwin \
> --node-count 1 \
> --kubernetes-version 1.15.7
The behavior of this command has been altered by the following extension: aks-preview
--spot_max_price can only be set when --priority is Spot

to get around this, I've just added the node pool from the web ui, or use my local az command, which is at the following version:
➜ az version
This command is in preview. It may be changed/removed in a future release.
{
"azure-cli": "2.0.80",
"azure-cli-command-modules-nspkg": "2.0.3",
"azure-cli-core": "2.0.80",
"azure-cli-nspkg": "3.0.4",
"azure-cli-telemetry": "1.0.4",
"extensions": {
"azure-devops": "0.12.0",
"interactive": "0.4.1"
}
}


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Pri1 container-servicsvc cxp product-question triaged

All 8 comments

@seanalexander Thanks for the question! We're investigating this and will get back to you shortly.

Did you registered for spot on AKS?

az feature register --namespace "Microsoft.ContainerService" --name "spotpoolpreview"

Document is here

Did you registered for spot on AKS?

az feature register --namespace "Microsoft.ContainerService" --name "spotpoolpreview"

Document is here

I didn't--I just verified with:
az feature list -o table --query "[?contains(name, 'Microsoft.ContainerService/spotpoolpreview')].{Name:name,State:properties.state}"

That the feature isn't enabled.

Should it have been? That wasn't in the original article.

Registration for that is not related to this issue. Actual issue is in aks-preview extension with version 0.4.30

Fix is released. Please update your extensiosn to that latest version. Then it will work well

Command to update
az extension update -n aks-preview

command to verify
az extension list

Sample output:

[
  {
    "extensionType": "whl",
    "name": "log-analytics",
    "version": "0.1.3"
  },
  {
    "extensionType": "whl",
    "name": "azure-firewall",
    "version": "0.1.8"
  },
  {
    "extensionType": "whl",
    "name": "aks-preview",
    "version": "0.4.33"
  }
]

Now the latest version is 0.4.33

@seanalexander Is there any update

@seanalexander
I will close this out for now. If you need additional help please open a new issue

Just checked this morning. It worked! Thank you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AronT-TLV picture AronT-TLV  Â·  3Comments

mrdfuse picture mrdfuse  Â·  3Comments

bityob picture bityob  Â·  3Comments

behnam89 picture behnam89  Â·  3Comments

spottedmahn picture spottedmahn  Â·  3Comments