KVM and virsh command-line utility.
Requirements
Make sure you have the following installed and configured:- Kernel with KVM enabled (
/dev/kvmmust exist) - QEMU
- virsh: Command-line interface for managing KVM/QEMU VMs
- kubectl: Kubernetes CLI
- talosctl: CLI for interacting with Talos clusters
- 16 GB RAM: Recommended minimum for running the VMs
- (Optional)
virt-managerfor a graphical interface
Note: This guide assumes you are running all the commands from the following working directory.Create a working directory for your project files:
metal-amd64.iso from the Talos GitHub releases page.
Configure the Network
Before we get started, letβs set up an isolated network for your Talos cluster. Use the following command to write the required network configuration into a file.- IPv4 Only
- Dual Stack
Note: You should see the network as Active.
Expected output:
Provisioning the Environment
Now that you have a dedicated network letβs go ahead and provision VMs.Note: For the network interface emulation,Use the following command to create a controlplane node:virtioande1000are supported. In the next command, you will use the--network network=my-talos-netflag to attach the VMs to the Talos network you created earlier. The values for βram and βvcpus in this guide are suggestions. You can adjust these to match the resources available on your host machine and the needs of your workload.
Configure the Cluster
Now that you have your VMs provisioned itβs time to configure the cluster. This step is done throughtalosctl command utility.
Use the following command to view your control plane IP address, and do the same for your worker node by adjusting the vm name:
CP_IP and NODE_IP.
You can automate this step with the following commands:
Bootstrapping the Cluster
After your VMs restart, you can bootstrap the cluster. Bootstrap simply means starting up your Kubernetes cluster for the first time. To do this, provide thetalosconfig file (generated earlier) to the talosctl command-line utility. The easiest way is to export the path to talosconfig as an environment variable.
Use the following command to export your talosconfig:
talosctl where to connect:
Note: Keep in mind that it may take a couple of seconds for the bootstraping to complete.Use the following command to bootstrap the cluster:
Accessing the cluster
To access your cluster you need to export the kubeconfig file from the Talos cluster. Use the following command to export the kubeconfig file:KUBECONFIG environment variable to use your new kubeconfig file.
kubectl to interact with your Talos Kubernetes cluster. Check the status of your nodes with kubectl to verify they are ready.