Deploy Microsoft Windows Workloads on an Azure AKS Cluster
Palette supports the deployment of Microsoft Windows applications on Azure AKS clusters. For the Windows applications to work, Palette requires a Windows-based node pool created within the cluster. This section guides you on creating a Windows node pool within an existing AKS cluster managed by Palette and configuring your Windows application to be deployed to that node pool.
Prerequisites
-
An AKS cluster created as described in the Create and Manage Azure AKS Cluster guide.
-
A Linux-based node pool configured as the system node pool as described in the Create and Manage Azure AKS Cluster guide.
-
A Windows node pool configured as described in the Create a Windows Node Pool section.
Enablement
Create a Windows Node Pool
Follow the steps below to create a Windows node pool within an existing AKS cluster. Refer to the Node Pools page for more information about node pool configuration.
Palette also allows you to add a Windows node pool during the creation of an AKS cluster. Refer to the Node Pool guide to learn more.
-
Log in to Palette, navigate to the left Main Menu, and click on Clusters.
-
Select your Azure AKS cluster.
-
Navigate to the Nodes tab and click on New Node Pool.
-
Provide a name for your node pool. When naming a node pool, it is good practice to include a name that matches the node and operating system (OS) in Azure.
-
If auto-scaling is necessary, enable the Enable Autoscaler option.
warningDo not select the System Node Pool option. System node pools must be Linux-based, and choosing this option will remove the ability to create a Windows node pool.
-
Enter the Number of nodes in the pool, or set the Minimum Size and Maximum Size if you have enabled Autoscaler.
-
Include Additional Labels if desired. This step is optional.
-
Enable Taints. This step is also optional.
-
Choose the Instance type. Once selected, the cost details will be displayed.
-
For the OS Type, choose Windows.
-
Select the Managed Disk information and its size.
-
Last, click on Confirm to create the Windows node pool.
The video below showcases the process of creating a Windows node pool within an existing AKS cluster.
Create an Add-on Profile with a Windows Workload
After creating your Windows node pool, use the following steps to create an add-on cluster profile with a Windows workload.
-
Follow the Add a Manifest to an Add-on Profile guide to create an add-on cluster profile with a custom manifest.
-
Use the manifest provided below for a sample ASP.NET application. Alternatively, use your own Windows application manifest. It is essential to include in the spec block of the manifest the nodeSelector: "kubernetes.io/os": windows specification. This specification is required for Kubernetes to know that the application needs to be deployed on a Windows node.
apiVersion: v1
kind: Namespace
metadata:
name: win-pack
---
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: win-pack
name: sample
labels:
app: sample
spec:
replicas: 1
template:
metadata:
name: sample
labels:
app: sample
spec:
nodeSelector:
"kubernetes.io/os": windows
containers:
- name: sample
image: mcr.microsoft.com/dotnet/framework/samples:aspnetapp
resources:
limits:
cpu: 1
memory: 800M
ports:
- containerPort: 80
selector:
matchLabels:
app: sample
---
apiVersion: v1
kind: Service
metadata:
name: sample
namespace: win-pack
spec:
type: LoadBalancer
ports:
- protocol: TCP
port: 80
selector:
app: sample
Deploy a Windows Add-on Profile to an Existing AKS Cluster
Lastly, after creating your add-on cluster profile, attach it to your AKS cluster that has the previously created Windows node pool. Follow the steps outlined in the Attach an Add-on Profile guide to attach your add-on cluster profile to the AKS cluster.
Validate
-
In Palette, navigate to the left Main Menu and select Clusters.
-
Next, click on your AKS cluster, which will open the cluster's Overview page.
-
Click on the exposed Services URL to access the Windows application landing page.