Prerequisites
-
Download the latest
metal-amd64.isofrom the GitHub releases page. -
Create a
New-TalosVMfolder in one of your PS Module Path folders ($env:PSModulePath -split ';') and save the New-TalosVM.psm1 there. -
Create a Virtual Switch:
- Open Hyper-V Manager (
Win + R, typevirtmgmt.msc, press Enter). - From the Action menu, select Virtual Switch Managerβ¦.
- Choose New virtual network switch β External, then click Create Virtual Switch.
- Name the switch LAB, select the network adapter you want to bind to, and click Apply and OK.
- Verify that the LAB switch appears in the list of virtual switches.
- Open Hyper-V Manager (
-
Allow PowerShell Script Execution:
- Open PowerShell and run:
- Confirm the change when prompted.
- Open PowerShell and run:
Plan Overview
We will create a basic 3-node cluster with one control-plane node and two worker nodes. The main difference between the control plane and worker nodes is the amount of RAM and an additional storage VHD for the worker nodes. This can be customized to your preference. We use aVMNamePrefix argument for the VM name prefix, not the full hostname.
This command will find any existing VM with that prefix and increment the highest suffix found.
For example, if talos-cp01 and talos-cp02 exist, it will create VMs starting from talos-cp03, depending on the NumberOfVMs argument.
Setup a Control Plane Node
Note: Ensure the LAB adapter exists in Hyper-V and is set to external.
Create a single control plane node with the following command:
talos-cp01 VM and power it on.
Setup Worker Nodes
Create two worker nodes with the following command:talos-worker01 and talos-worker02 VMs, each with an additional 50GB VHD for storage (which can be used for Mayastor).
Push Config to the Nodes
Once the VMs are ready, find their IP addresses from the VM console. Push the config to the control plane node with:Push Config to Worker Nodes
Similarly, for the worker nodes:Bootstrap Cluster
With the nodes ready, bootstrap the Kubernetes cluster:Remove ISO
After a successful bootstrap, remove the ISO from the Hyper-V instances (both worker and control plane). Otherwise, Talos might fail to boot. This will generate thekubeconfig file, which you can use to connect to the cluster.