Skip to content

Commit 091cf04

Browse files
Merge pull request #262730 from tamram/tamram24-0104
AKS PSH/CLI quickstarts: consistency & accuracy, part 2
2 parents e62e41f + 4b77f3b commit 091cf04

File tree

3 files changed

+72
-58
lines changed

3 files changed

+72
-58
lines changed

articles/aks/learn/quick-windows-container-deploy-cli.md

Lines changed: 35 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Create a Windows Server container on an Azure Kubernetes Service (AKS) cl
33
description: Learn how to quickly create a Kubernetes cluster and deploy an application in a Windows Server container in Azure Kubernetes Service (AKS) using Azure CLI.
44
ms.topic: article
55
ms.custom: event-tier1-build-2022, devx-track-azurecli
6-
ms.date: 12/27/2023
6+
ms.date: 01/09/2024
77
#Customer intent: As a developer or cluster operator, I want to quickly create an AKS cluster and deploy a Windows Server container so that I can see how to run applications running on a Windows Server container using the managed Kubernetes service in Azure.
88
---
99

@@ -16,7 +16,9 @@ Azure Kubernetes Service (AKS) is a managed Kubernetes service that lets you qui
1616
This article assumes a basic understanding of Kubernetes concepts. For more information, see [Kubernetes core concepts for Azure Kubernetes Service (AKS)](../concepts-clusters-workloads.md).
1717

1818
- [!INCLUDE [quickstarts-free-trial-note](../../../includes/quickstarts-free-trial-note.md)]
19-
- [!INCLUDE [azure-cli-prepare-your-environment.md](~/articles/reusable-content/azure-cli/azure-cli-prepare-your-environment.md)]
19+
20+
[!INCLUDE [azure-cli-prepare-your-environment-no-header.md](~/articles/reusable-content/azure-cli/azure-cli-prepare-your-environment-no-header.md)]
21+
2022
- This article requires version 2.0.64 or later of the Azure CLI. If you are using Azure Cloud Shell, then the latest version is already installed.
2123
- Make sure that the identity you're using to create your cluster has the appropriate minimum permissions. For more details on access and identity for AKS, see [Access and identity options for Azure Kubernetes Service (AKS)](../concepts-identity.md).
2224
- If you have multiple Azure subscriptions, select the appropriate subscription ID in which the resources should be billed using the [az account](/cli/azure/account) command.
@@ -25,7 +27,7 @@ This article assumes a basic understanding of Kubernetes concepts. For more info
2527

2628
An [Azure resource group](../../azure-resource-manager/management/overview.md) is a logical group in which Azure resources are deployed and managed. When you create a resource group, you're asked to specify a location. This location is where resource group metadata is stored and where your resources run in Azure if you don't specify another region during resource creation.
2729

28-
- Create a resource group using the [az group create][az-group-create] command. The following example creates a resource group named *myResourceGroup* in the *eastus* location.
30+
- Create a resource group using the [az group create][az-group-create] command. The following example creates a resource group named *myResourceGroup* in the *eastus* location. Enter this command and other commands in this article into a BASH shell:
2931

3032
```azurecli
3133
az group create --name myResourceGroup --location eastus
@@ -51,20 +53,19 @@ An [Azure resource group](../../azure-resource-manager/management/overview.md) i
5153
5254
In this section, we create an AKS cluster with the following configuration:
5355
54-
- The cluster is configured with two nodes to ensure it operates reliably.
56+
- The cluster is configured with two nodes to ensure it operates reliably. A [node](../concepts-clusters-workloads.md#nodes-and-node-pools) is an Azure virtual machine (VM) that runs the Kubernetes node components and container runtime.
5557
- The `--windows-admin-password` and `--windows-admin-username` parameters set the administrator credentials for any Windows Server nodes on the cluster and must meet [Windows Server password requirements][windows-server-password].
5658
- The node pool uses `VirtualMachineScaleSets`.
5759
58-
> [!NOTE]
59-
> To run an AKS cluster that supports node pools for Windows Server containers, your cluster needs to use a network policy that uses [Azure CNI (advanced)][azure-cni] network plugin.
60+
To create the AKS cluster with Azure CLI, follow these steps:
6061
61-
1. Create a username to use as administrator credentials for the Windows Server nodes on your cluster. The following commands prompt you for a username and set it to *WINDOWS_USERNAME* for use in a later command (remember the commands in this article are entered into a BASH shell).
62+
1. Create a username to use as administrator credentials for the Windows Server nodes on your cluster. The following commands prompt you for a username and set it to *WINDOWS_USERNAME* for use in a later command.
6263
6364
```azurecli
6465
echo "Please enter the username to use as administrator credentials for Windows Server nodes on your cluster: " && read WINDOWS_USERNAME
6566
```
6667
67-
1. Create a password for the administrator username you created in the previous step.
68+
1. Create a password for the administrator username you created in the previous step. The password must be a minimum of 14 characters and meet the [Windows Server password complexity requirements][windows-server-password].
6869
6970
```azurecli
7071
echo "Please enter the password to use as administrator credentials for Windows Server nodes on your cluster: " && read WINDOWS_PASSWORD
@@ -85,21 +86,23 @@ In this section, we create an AKS cluster with the following configuration:
8586
--network-plugin azure
8687
```
8788
88-
If you get a password validation error, verify the password you set meets the [Windows Server password requirements][windows-server-password]. Also see [What are the password requirements when creating a VM?](/azure/virtual-machines/windows/faq#what-are-the-password-requirements-when-creating-a-vm-). If your password meets the requirements, try creating your resource group in another region. Then try creating the cluster with the new resource group.
89+
After a few minutes, the command completes and returns JSON-formatted information about the cluster. Occasionally, the cluster can take longer than a few minutes to provision. Allow up to 10 minutes for provisioning.
90+
91+
If you get a password validation error, and the password that you set meets the length and complexity requirements, try creating your resource group in another region. Then try creating the cluster with the new resource group.
8992
9093
If you don't specify an administrator username and password when creating the node pool, the username is set to *azureuser* and the password is set to a random value. For more information, see [How do I change the administrator password for Windows Server nodes on my cluster?](../windows-faq.md#how-do-i-change-the-administrator-password-for-windows-server-nodes-on-my-cluster).
9194
92-
The administrator username can't be changed, but you can change the administrator password your AKS cluster uses for Windows Server nodes using `az aks update`. For more information, see [Windows Server node pools FAQ][win-faq-change-admin-creds].
95+
The administrator username can't be changed, but you can change the administrator password that your AKS cluster uses for Windows Server nodes using `az aks update`. For more information, see [Windows Server node pools FAQ][win-faq-change-admin-creds].
9396
94-
After a few minutes, the command completes and returns JSON-formatted information about the cluster. Occasionally, the cluster can take longer than a few minutes to provision. Allow up to 10 minutes for provisioning.
97+
To run an AKS cluster that supports node pools for Windows Server containers, your cluster needs to use a network policy that uses [Azure CNI (advanced)][azure-cni] network plugin. The `--network-plugin azure` parameter specifies Azure CNI.
9598
9699
## Add a node pool
97100
98101
By default, an AKS cluster is created with a node pool that can run Linux containers. You must add another node pool that can run Windows Server containers alongside the Linux node pool.
99102
100103
Windows Server 2022 is the default operating system for Kubernetes versions 1.25.0 and higher. Windows Server 2019 is the default OS for earlier versions. If you don't specify a particular OS SKU, Azure creates the new node pool with the default SKU for the version of Kubernetes used by the cluster.
101104
102-
### [Add a Windows node pool (default SKU)](#tab/add-windows-node-pool)
105+
### [Windows node pool (default SKU)](#tab/add-windows-node-pool)
103106
104107
To use the default OS SKU, create the node pool without specifying an OS SKU. The node pool is configured for the default operating system based on the Kubernetes version of the cluster.
105108
@@ -114,46 +117,46 @@ az aks nodepool add \
114117
--node-count 1
115118
```
116119

117-
### [Add a Windows Server 2019 node pool](#tab/add-windows-server-2019-node-pool)
120+
### [Windows Server 2022 node pool](#tab/add-windows-server-2022-node-pool)
118121

119-
To use Windows Server 2019, specify the following parameters:
122+
To use Windows Server 2022, specify the following parameters:
120123

121124
- `os-type` set to `Windows`
122-
- `os-sku` set to `Windows2019`
125+
- `os-sku` set to `Windows2022`
123126

124127
> [!NOTE]
125-
> Windows Server 2019 is being retired after Kubernetes version 1.32 reaches end of life (EOL) and won't be supported in future releases. For more information about this retirement, see the [AKS release notes][aks-release-notes].
128+
> Windows Server 2022 requires Kubernetes version 1.23.0 or higher.
126129
127-
Add a Windows Server 2019 node pool using the `az aks nodepool add` command:
130+
Add a Windows Server 2022 node pool using the `az aks nodepool add` command:
128131

129132
```azurecli
130133
az aks nodepool add \
131134
--resource-group myResourceGroup \
132135
--cluster-name myAKSCluster \
133136
--os-type Windows \
134-
--os-sku Windows2019 \
137+
--os-sku Windows2022 \
135138
--name npwin \
136139
--node-count 1
137140
```
138141

139-
### [Add a Windows Server 2022 node pool](#tab/add-windows-server-2022-node-pool)
142+
### [Windows Server 2019 node pool](#tab/add-windows-server-2019-node-pool)
140143

141-
To use Windows Server 2022, specify the following parameters:
144+
To use Windows Server 2019, specify the following parameters:
142145

143146
- `os-type` set to `Windows`
144-
- `os-sku` set to `Windows2022`
147+
- `os-sku` set to `Windows2019`
145148

146149
> [!NOTE]
147-
> Windows Server 2022 requires Kubernetes version 1.23.0 or higher.
150+
> Windows Server 2019 is being retired after Kubernetes version 1.32 reaches end of life (EOL) and won't be supported in future releases. For more information about this retirement, see the [AKS release notes][aks-release-notes].
148151
149-
Add a Windows Server 2022 node pool using the `az aks nodepool add` command:
152+
Add a Windows Server 2019 node pool using the `az aks nodepool add` command:
150153

151154
```azurecli
152155
az aks nodepool add \
153156
--resource-group myResourceGroup \
154157
--cluster-name myAKSCluster \
155158
--os-type Windows \
156-
--os-sku Windows2022 \
159+
--os-sku Windows2019 \
157160
--name npwin \
158161
--node-count 1
159162
```
@@ -162,7 +165,7 @@ az aks nodepool add \
162165

163166
## Connect to the cluster
164167

165-
You use [kubectl][kubectl], the Kubernetes command-line client, to manage your Kubernetes clusters. If you use Azure Cloud Shell, `kubectl` is already installed. To you want to install `kubectl` locally, you can use the [az aks install-cli][az-aks-install-cli] command.
168+
You use [kubectl][kubectl], the Kubernetes command-line client, to manage your Kubernetes clusters. If you use Azure Cloud Shell, `kubectl` is already installed. If you want to install `kubectl` locally, you can use the [az aks install-cli][az-aks-install-cli] command.
166169

167170
1. Configure `kubectl` to connect to your Kubernetes cluster using the [az aks get-credentials][az-aks-get-credentials] command. This command downloads credentials and configures the Kubernetes CLI to use them.
168171

@@ -180,13 +183,13 @@ You use [kubectl][kubectl], the Kubernetes command-line client, to manage your K
180183
181184
```output
182185
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
183-
aks-nodepool1-90538373-vmss000000 Ready agent 54m v1.25.6 10.224.0.33 <none> Ubuntu 22.04.2 LTS 5.15.0-1035-azure containerd://1.6.18+azure-1
184-
aks-nodepool1-90538373-vmss000001 Ready agent 55m v1.25.6 10.224.0.4 <none> Ubuntu 22.04.2 LTS 5.15.0-1035-azure containerd://1.6.18+azure-1
185-
aksnpwin000000 Ready agent 40m v1.25.6 10.224.0.62 <none> Windows Server 2022 Datacenter 10.0.20348.1668 containerd://1.6.14+azure
186-
```
186+
aks-nodepool1-20786768-vmss000000 Ready agent 22h v1.27.7 10.224.0.4 <none> Ubuntu 22.04.3 LTS 5.15.0-1052-azure containerd://1.7.5-1
187+
aks-nodepool1-20786768-vmss000001 Ready agent 22h v1.27.7 10.224.0.33 <none> Ubuntu 22.04.3 LTS 5.15.0-1052-azure containerd://1.7.5-1
188+
aksnpwin000000 Ready agent 20h v1.27.7 10.224.0.62 <none> Windows Server 2022 Datacenter 10.0.20348.2159 containerd://1.6.21+azure
189+
```
187190
188191
> [!NOTE]
189-
> The container runtime for each node pool is shown under *CONTAINER-RUNTIME*. Notice *aksnpwin987654* begins with `docker://`, which means it uses Docker for the container runtime. Notice *aksnpwcd123456* begins with `containerd://`, which means it uses `containerd` for the container runtime.
192+
> The container runtime for each node pool is shown under *CONTAINER-RUNTIME*. The container runtime values begin with `containerd://`, which means that they each use `containerd` for the container runtime.
190193
191194
## Deploy the application
192195
@@ -241,6 +244,8 @@ The ASP.NET sample application is provided as part of the [.NET Framework Sample
241244
242245
For a breakdown of YAML manifest files, see [Deployments and YAML manifests](../concepts-clusters-workloads.md#deployments-and-yaml-manifests).
243246
247+
If you create and save the YAML file locally, then you can upload the manifest file to your default directory in CloudShell by selecting the **Upload/Download files** button and selecting the file from your local file system.
248+
244249
1. Deploy the application using the [kubectl apply][kubectl-apply] command and specify the name of your YAML manifest.
245250
246251
```console

articles/aks/learn/quick-windows-container-deploy-portal.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,11 @@ You use [kubectl][kubectl], the Kubernetes command-line client, to manage your K
112112
113113
```output
114114
NAME STATUS ROLES AGE VERSION
115-
aks-nodepool1-12345678-vmssfedcba Ready agent 13m v1.16.7
116-
aksnpwin987654 Ready agent 108s v1.16.7
115+
aks-agentpool-41946322-vmss000001 Ready agent 7m51s v1.27.7
116+
aks-agentpool-41946322-vmss000002 Ready agent 7m5s v1.27.7
117+
aks-npwin-41946322-vmss000000 Ready agent 7m43s v1.27.7
118+
aks-userpool-41946322-vmss000001 Ready agent 7m47s v1.27.7
119+
aks-userpool-41946322-vmss000002 Ready agent 6m57s v1.27.7
117120
```
118121
119122
---
@@ -171,7 +174,8 @@ The ASP.NET sample application is provided as part of the [.NET Framework Sample
171174
172175
For a breakdown of YAML manifest files, see [Deployments and YAML manifests](../concepts-clusters-workloads.md#deployments-and-yaml-manifests).
173176
174-
1. If you create and save the YAML file locally, then you can upload the manifest file to your default directory in CloudShell by selecting the **Upload/Download files** button and selecting the file from your local file system.
177+
If you create and save the YAML file locally, then you can upload the manifest file to your default directory in CloudShell by selecting the **Upload/Download files** button and selecting the file from your local file system.
178+
175179
1. Deploy the application using the [`kubectl apply`][kubectl-apply] command and specify the name of your YAML manifest.
176180
177181
```console

0 commit comments

Comments
 (0)