-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Description
Description of the new feature
I propose a cmdlet that enables the user to get a list of Kubernetes orchestrator versions (i.e., 1.14.8). This will enable the user to:
- List orchestrator versions from the command line without needing the separate
azcommand. - Query for available Kubernetes versions to see when there are upgrades available for their cluster.
- Create PowerShell scripts that provision Kubernetes clusters based on the "default" orchestrator version.
- Create PowerShell scripts that provision Kubernetes clusters based on the latest available patch version. (e.g., I want the latest 1.14 Kubernetes cluster, so the cmdlet provides me with 1.14.8)
Proposed implementation details (optional)
This information is available on the REST API here: https://management.azure.com/subscriptions/$subscriptionId/providers/Microsoft.ContainerService/locations/$clusterLocation/orchestrators?api-version=2019-08-01
The cmdlet might be used like this:
Get all versions
Get-AzAksVersion -Location $location
Get the default version (per the management API)
Get-AzAksVersion -DefaultVersion -Location $location
Get all versions like 1.14
Get-AzAksVersion -VersionLike "1.14.*" -Location $location
Get the latest version like 1.14
Get-AzAksVersion -LatestVersionLike "1.14.*" -Location $location
The structure of the data returned could mirror what the API currently returns:
{
"id": "/subscriptions/.../providers/Microsoft.ContainerService/locations/.../orchestrators",
"name": "default",
"orchestrators": [
{
"default": null,
"orchestratorType": "Kubernetes",
"orchestratorVersion": "1.13.11",
"upgrades": [
{
"orchestratorType": "Kubernetes",
"orchestratorVersion": "1.13.12"
},
{
"orchestratorType": "Kubernetes",
"orchestratorVersion": "1.14.7"
},
{
"orchestratorType": "Kubernetes",
"orchestratorVersion": "1.14.8"
}
]
},
{
"default": null,
"orchestratorType": "Kubernetes",
"orchestratorVersion": "1.13.12",
"upgrades": [
{
"orchestratorType": "Kubernetes",
"orchestratorVersion": "1.14.7"
},
{
"orchestratorType": "Kubernetes",
"orchestratorVersion": "1.14.8"
}
]
}
]
}