You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/aks/create-node-pools.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -163,7 +163,7 @@ The Azure Linux container host for AKS is an open-source Linux distribution avai
163
163
You can migrate your existing Ubuntu nodes to Azure Linux using one of the following methods:
164
164
165
165
* [Remove existing node pools and add new Azure Linux node pools](../azure-linux/tutorial-azure-linux-migration.md#add-azure-linux-node-pools-and-remove-existing-node-pools).
166
-
* [In-place OS SKU migration (preview)](../azure-linux/tutorial-azure-linux-migration.md#in-place-os-sku-migration-preview).
166
+
* [In-place OS SKU migration (preview)](../azure-linux/tutorial-azure-linux-migration.md#in-place-os-sku-migration).
In this tutorial, part three of five, you migrate your existing nodes to Azure Linux. You can migrate your existing nodes to Azure Linux using one of the following methods:
16
16
17
17
* Remove existing node pools and add new Azure Linux node pools.
18
-
* In-place OS SKU migration (preview).
18
+
* In-place OS SKU migration.
19
19
20
20
If you don't have any existing nodes to migrate to Azure Linux, skip to the [next tutorial](./tutorial-azure-linux-telemetry-monitor.md). In later tutorials, you learn how to enable telemetry and monitoring in your clusters and upgrade Azure Linux nodes.
21
21
@@ -42,79 +42,33 @@ If you don't have any existing nodes to migrate to Azure Linux, skip to the [nex
42
42
az aks nodepool delete --resource-group <resource-group-name> --cluster-name <cluster-name> --name <node-pool-name>
43
43
```
44
44
45
-
## In-place OS SKU migration (preview)
45
+
## In-place OS SKU migration
46
46
47
47
You can now migrate your existing Ubuntu node pools to Azure Linux by changing the OS SKU of the node pool, which rolls the cluster through the standard node image upgrade process. This new feature doesn't require the creation of new node pools.
48
48
49
49
### Limitations
50
50
51
51
There are several settings that can block the OS SKU migration request. To ensure a successful migration, review the following guidelines and limitations:
52
52
53
-
* The OS SKU migration feature isn't available through Terraform, PowerShell, or the Azure portal.
53
+
* The OS SKU migration feature isn't available through PowerShell or the Azure portal.
54
54
* The OS SKU migration feature isn't able to rename existing node pools.
55
55
* Ubuntu and Azure Linux are the only supported Linux OS SKU migration targets.
56
-
* AgentPool `count` field must not change during the migration.
57
56
* An Ubuntu OS SKU with `UseGPUDedicatedVHD` enabled can't perform an OS SKU migration.
58
57
* An Ubuntu OS SKU with CVM 20.04 enabled can't perform an OS SKU migration.
59
58
* Node pools with Kata enabled can't perform an OS SKU migration.
60
59
* Windows OS SKU migration isn't supported.
61
60
62
61
### Prerequisites
63
62
64
-
* [Install the `aks-preview` extension](#install-the-aks-preview-extension).
65
-
* [Register the `OSSKUMigrationPreview` feature flag on your subscription](#register-the-osskumigrationpreview-feature-flag).
66
63
* An existing AKS cluster with at least one Ubuntu node pool.
67
64
* We recommend that you ensure your workloads configure and run successfully on the Azure Linux container host before attempting to use the OS SKU migration feature by [deploying an Azure Linux cluster](./quickstart-azure-cli.md) in dev/prod and verifying your service remains healthy.
68
65
* Ensure the migration feature is working for you in test/dev before using the process on a production cluster.
69
66
* Ensure that your pods have enough [Pod Disruption Budget](../aks/operator-best-practices-scheduler.md#plan-for-availability-using-pod-disruption-budgets) to allow AKS to move pods between VMs during the upgrade.
70
-
* You need Azure CLI version 0.5.172 or higher. Run `az --version` to find the version. If you need to install or upgrade, see [Install Azure CLI](/cli/azure/install-azure-cli).
67
+
* You need Azure CLI version [2.61.0](https://learn.microsoft.com/cli/azure/release-notes-azure-cli#may-21-2024) or higher. Run `az --version` to find the version. If you need to install or upgrade, see [Install Azure CLI](/cli/azure/install-azure-cli).
68
+
* If you are using Terraform, you must have [v3.111.0](https://github.com/hashicorp/terraform-provider-azurerm/releases/tag/v3.111.0) or greater of the AzureRM Terraform module.
71
69
72
70
### [Azure CLI](#tab/azure-cli)
73
71
74
-
#### Install the `aks-preview` extension
75
-
76
-
[!INCLUDE [preview features callout](~/reusable-content/ce-skilling/azure/includes/aks/includes/preview/preview-callout.md)]
77
-
78
-
1. Install the `aks-preview` extension using the `az extension add` command.
79
-
80
-
```azurecli-interactive
81
-
az extension add --name aks-preview
82
-
```
83
-
84
-
2. Update the extension to make sure you have the latest version using the `az extension update` command.
85
-
86
-
```azurecli-interactive
87
-
az extension update --name aks-preview
88
-
```
89
-
90
-
#### Register the `OSSKUMigrationPreview` feature flag
91
-
92
-
1. Register the `OSSKUMigrationPreview` feature flag on your subscription using the `az feature register` command.
93
-
94
-
```azurecli-interactive
95
-
az feature register --namespace Microsoft.ContainerService --name OSSKUMigrationPreview
96
-
```
97
-
98
-
2. Check the registration status using the `az feature list` command.
99
-
100
-
```azurecli-interactive
101
-
az feature list -o table --query "[?contains(name, 'Microsoft.ContainerService/OSSKUMigrationPreview')].{Name:name,State:properties.state}"
102
-
```
103
-
104
-
Your output should look similar to the following example output:
3. Refresh the registration of the `OSSKUMigrationPreview` feature flag using the `az provider register` command.
113
-
114
-
```azurecli-interactive
115
-
az provider register --namespace Microsoft.ContainerService
116
-
```
117
-
118
72
#### Migrate the OS SKU of your Ubuntu node pool
119
73
120
74
* Migrate the OS SKU of your node pool to Azure Linux using the `az aks nodepool update` command. This command updates the OS SKU for your node pool from Ubuntu to Azure Linux. The OS SKU change triggers an immediate upgrade operation, which takes several minutes to complete.
@@ -238,18 +192,123 @@ There are several settings that can block the OS SKU migration request. To ensur
238
192
az deployment group create --resource-group testRG --template-file 0base.json
239
193
```
240
194
241
-
3. Migrate the OS SKU of your system node pool to Azure Linux using the `az deployment group create` command and the ManagedClusters API in the [1mcupdate.json example ARM template](#1mcupdatejson).
195
+
3. Migrate the OS SKU of your system node pool to Azure Linux using the `az deployment group create` command.
242
196
243
197
```azurecli-interactive
244
198
az deployment group create --resource-group testRG --template-file 1mcupdate.json
245
199
```
246
200
247
-
4. Migrate the OS SKU of your system node pool back to Ubuntu using the `az deployment group create` command and the AgentPools API in the [2apupdate.json example ARM template](#2apupdatejson).
201
+
4. Migrate the OS SKU of your system node pool back to Ubuntu using the `az deployment group create` command.
248
202
249
203
```azurecli-interactive
250
204
az deployment group create --resource-group testRG --template-file 2apupdate.json
251
205
```
252
206
207
+
### [Terraform](#tab/terraform)
208
+
209
+
#### Example Terraform template
210
+
211
+
1. Confirm that your `providers.tf` file is updated to pick up the required version of the Azure provider.
212
+
213
+
##### providers.tf
214
+
215
+
```terraform
216
+
terraform {
217
+
required_version = ">=1.0"
218
+
219
+
required_providers {
220
+
azurerm = {
221
+
source = "hashicorp/azurerm"
222
+
version = "~>3.111.0"
223
+
}
224
+
random = {
225
+
source = "hashicorp/random"
226
+
version = "~>3.0"
227
+
}
228
+
}
229
+
}
230
+
231
+
provider "azurerm" {
232
+
features {}
233
+
}
234
+
```
235
+
236
+
2. For brevity, only the snippet of the Terraform template that is of interest is displayed below. In this initial configuration, an AKS cluster with a nodepool of **os_sku** with **Ubuntu** is deployed.
@@ -265,8 +324,8 @@ Once the migration is complete on your test clusters, you should verify the foll
265
324
266
325
### Run the OS SKU migration on your production clusters
267
326
268
-
1. Update your existing templates to set `OSSKU=AzureLinux`. In ARM templates, you use `"OSSKU: "AzureLinux"` in the `agentPoolProfile` section. In Bicep, you use `osSku: "AzureLinux"` in the `agentPoolProfile` section. Make sure that your `apiVersion` is set to `2023-07-01` or later.
269
-
2. Redeploy your ARM template for the cluster to apply the new `OSSKU` setting. During this deploy, your cluster behaves as if it's taking a node image upgrade. Your cluster surges capacity, and then reboots your existing nodes one by one into the latest AKS image from your new OS SKU.
327
+
1. Update your existing templates to set `OSSKU=AzureLinux`. In ARM templates, you use `"OSSKU: "AzureLinux"` in the `agentPoolProfile` section. In Bicep, you use `osSku: "AzureLinux"` in the `agentPoolProfile` section. Lastly, for Terraform, you use `"os_sku = "AzureLinux"` in the `default_node_pool` section. Make sure that your `apiVersion` is set to `2023-07-01` or later.
328
+
2. Redeploy your ARM, Bicep, or Terraform template for the cluster to apply the new `OSSKU` setting. During this deploy, your cluster behaves as if it's taking a node image upgrade. Your cluster surges capacity, and then reboots your existing nodes one by one into the latest AKS image from your new OS SKU.
270
329
271
330
### Rollback
272
331
@@ -283,7 +342,7 @@ If you experience issues during the OS SKU migration, you can roll back to your
283
342
In this tutorial, you migrated existing nodes to Azure Linux using one of the following methods:
284
343
285
344
* Remove existing node pools and add new Azure Linux node pools.
286
-
* In-place OS SKU migration (preview).
345
+
* In-place OS SKU migration.
287
346
288
347
In the next tutorial, you learn how to enable telemetry to monitor your clusters.
0 commit comments