Install Talos Linux for Kubernetes
Talos Linux is a specialized operating system developed by Sidero Labs and designed for running Kubernetes.
Runs in the server's RAM and uses the latest current version of Talos from official releases — learn more on the Releases page in the Sidero Labs GitHub repository.
You can connect to a server in Talos via VNC or through the KVM console.
- Prepare parameters for cluster node configuration.
- Prepare cluster node configuration.
- Apply the configuration to the Control Plane node.
- Apply the configuration to the Worker node.
- Initialize Kubernetes.
1. Prepare parameters for cluster node configuration
To prepare the configuration files for the Control Plane and Worker nodes, you need to collect the parameters for each server that will be part of the cluster.
-
Connect to the server via SSH or through the KVM console.
-
Output information about the network configuration:
ip a && ip rThe output will contain information about the network interfaces. Copy and save the network parameters. For example:
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000link/ether 1c:1b:0d:65:43:21 brd ff:ff:ff:ff:ff:ffaltname eno1altname enp4s0f0altname enxac1f6b47814ainet 203.0.113.10/24 brd 203.0.113.255 scope global eth0default via 203.0.113.1 dev eth0203.0.113.0/24 dev eth0 proto kernel scope link src 203.0.113.10Where:
203.0.113.10— public IP address of the server. The dedicated server IP address can also be viewed in the control panel: in the top menu, select Products → Dedicated Servers → Servers → server card → IP address field;203.0.113.1— default gateway;/24— subnet mask;1c:1b:0d:65:43:21— network interface MAC address.
-
Select the disk on which to install the Talos OS. To do this, list the available disks:
lsblkThe output will contain information about the disks. Copy and save the name of the disk you will install the OS on. For example:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTSloop0 7:0 0 547.9M 1 loop /run/archiso/airootfssda 8:0 0 447.1G 0 disksdb 8:16 0 447.1G 0 disksdc 8:32 0 3.6T 0 disksdd 8:48 0 3.6T 0 disk -
Change the server boot template. You can:
- restore the previous server boot template or reboot the server from the OS. When rebooting the server from the OS, the boot template will automatically change back to the one set before booting the server in Rescue mode;
- or boot the server directly in Talos mode to continue installing Talos Linux.
-
Repeat steps 1-5 for each server in the cluster.
2. Prepare the cluster node configuration
-
Make sure the
talosctlclient is installed on the server from which you will install Talos OS. -
Create a base cluster configuration:
talosctl gen config my-cluster https://<ip_address>:6443Specify
<ip_address>— the public IP address of the Control Plane server that you saved in step 3 when preparing parameters in stage 1. The dedicated server IP address can also be viewed in the control panel: in the top menu, select Products → Dedicated Servers → Servers → server card → IP address field.The output will contain information about successful configuration generation. For example:
generating PKI and tokenscreated controlplane.yamlcreated worker.yamlcreated talosconfigWhere:
controlplane.yaml— configuration template for the Control Plane node;worker.yaml— configuration template for Worker nodes;talosconfig— configuration of thetalosctlclient.
-
Create a patch file for the Control Plane node:
3.1. Use the
vitext editor to create a patch file for the Control Plane node:vi <file_name>Specify
<file_name>— file name inyamlformat, for examplepatch-cp1.yaml.3.2. Add the configuration to the file:
cluster:allowSchedulingOnControlPlanes: truemachine:install:disk: /dev/<disk>network:interfaces:- deviceSelector:hardwareAddr: "<mac_address>"addresses:- <ip_address>/<mask>routes:- network: 0.0.0.0/0gateway: <gateway>dhcp: falsenameservers:- <dns_server>Specify:
<disk>— name of the disk to install Talos OS on, which you selected in step 3 when preparing parameters in stage 1;<mac_address>— network interface MAC address that you saved in step 3 when preparing parameters in stage 1;<ip_address>— public IP address of the server that you saved in step 3 when preparing parameters in stage 1. You can also view the dedicated server IP address in the control panel: in the top menu, select Products → Dedicated Servers → Servers → server card → the IP address field;<mask>— subnet mask that you saved in step 3 when preparing parameters in stage 1;<gateway>— default gateway that you saved in step 3 when preparing parameters in stage 1;<dns_server>— IP address of the DNS server. You can add multiple DNS servers. We recommend using Servercore recursive DNS servers, but you can specify any available DNS servers.
3.3. Exit the
vitext editor saving changes::wq -
If the cluster uses multiple servers, create a configuration for the Worker node. For a single server (Single Node Cluster), you can skip creating configurations for Worker nodes.
4.1. Use the
vitext editor to create a patch file for the Worker node:vi <file_name>Specify
<file_name>— file name inyamlformat, for examplepatch-worker1.yaml.4.2. Add the configuration to the file:
machine:install:disk: /dev/<disk>network:interfaces:- deviceSelector:hardwareAddr: "<mac_address>"addresses:- <ip_address>/<mask>routes:- network: 0.0.0.0/0gateway: <gateway>dhcp: falsenameservers:- <dns_server>Specify:
<disk>— name of the disk to install Talos OS on, which you selected in step 3 when preparing parameters in stage 1;<mac_address>— network interface MAC address that you saved in step 3 when preparing parameters in stage 1;<ip_address>— public IP address of the server that you saved in step 3 when preparing parameters in stage 1. The dedicated server IP address can also be viewed in the control panel: in the top menu, select Products → Dedicated Servers → Servers → server card → IP address field;<mask>— subnet mask that you saved in step 3 when preparing parameters in stage 1;<gateway>— default gateway that you saved in step 3 when preparing parameters in stage 1;<dns_server>— IP address of the DNS server. You can add multiple DNS servers. We recommend using Servercore recursive DNS servers, but you can specify any available DNS servers.
4.3. Exit the
vitext editor saving changes::wq4.4. If you plan to have a cluster of multiple servers, repeat steps 4.1-4.3 to create separate patch files for each Worker node.
3. Apply the configuration to the Control Plane node
-
Boot the Control Plane server in recovery and diagnostics mode with the Talos template.
-
Connect to the server via VNC or through the KVM console.
-
Ensure the server is in Maintenance mode:
STAGE: Maintenance -
Apply the Control Plane node configuration:
talosctl apply-config \--insecure \-e <ip_address> \-n <ip_address> \--file controlplane.yaml \--config-patch @<file_name>Specify:
<ip_address>— public IP address of the Control Plane server that you saved in step 3 when preparing parameters in stage 1. The dedicated server IP address can also be viewed in the control panel: in the top menu, select Products → Dedicated Servers → Servers → server card → IP address field;<file_name>— Control Plane patch file that you created in step 3 when preparing cluster node configuration in stage 2, for examplepatch-cp1.yaml.
After applying the configuration, the response
Applied configuration without a rebootwill be returned, and the server will switch to theSTAGE: Installingmode. -
Wait for the OS installation to complete — the server will automatically reboot and switch to the
KUBELET: Healthymode.
4. Apply the configuration to the Worker node
-
Boot the Worker server in recovery and diagnostics mode with the Talos template.
-
Connect to the server via VNC or through the KVM console.
-
Ensure the server is in Maintenance mode:
STAGE: Maintenance -
Apply the Worker node configuration:
talosctl apply-config \--insecure \-e <ip_address> \-n <ip_address> \--file worker.yaml \--config-patch @<file_name>Specify:
<ip_address>— public IP address of the Worker node that you saved in step 3 when preparing parameters in stage 1. The dedicated server IP address can also be viewed in the control panel: in the top menu, select Products → Dedicated Servers → Servers → server card → IP address field;<file_name>— Worker node patch file that you created in step 4 when preparing cluster node configuration in stage 2, for examplepatch-worker1.yaml.
After applying the configuration, the response
Applied configuration without a rebootwill be returned, and the server will switch to theSTAGE: Installingmode. -
Wait for the OS installation to complete — the server will automatically reboot and switch to the
KUBELET: Healthymode.
5. Initialize Kubernetes
-
Create a Kubernetes cluster:
talosctl bootstrap \--nodes <ip_address> \--endpoints <ip_address> \--talosconfig ./talosconfigSpecify
<ip_address>— the public IP address of the Control Plane server that you saved in step 3 when preparing parameters in stage 1. The dedicated server IP address can also be viewed in the control panel: in the top menu, select Products → Dedicated Servers → Servers → server card → IP address field. -
Get the configuration file for managing the Kubernetes cluster:
talosctl kubeconfig \--nodes <ip_address> \--endpoints <ip_address> \--talosconfig ./talosconfigSpecify
<ip_address>— the public IP address of the Control Plane server that you saved in step 3 when preparing parameters in stage 1. The dedicated server IP address can also be viewed in the control panel: in the top menu, select Products → Dedicated Servers → Servers → server card → IP address field.The Kubernetes configuration file will be saved to
~/.kube/configby default. -
Check the status of the Kubernetes nodes:
kubectl get nodes -o wideThe output will contain information about node statuses. For example:
NAME STATUS ROLES VERSIONtalos-lv9-t5t Ready control-plane v1.36.0talos-xc9-jfu Ready <none> v1.36.0talos-ee2-e9f Ready <none> v1.36.0All nodes must have the
Readystatus. -
Check the system pods:
kubectl get pods -AThe output will contain information about the pod statuses. For example:
NAMESPACE NAME READY STATUS RESTARTS AGEkube-system kube-apiserver-talos-lv9-t5t 1/1 Running 0 5mkube-system kube-controller-manager-talos-lv9-t5t 1/1 Running 0 5mkube-system kube-scheduler-talos-lv9-t5t 1/1 Running 0 5mkube-system coredns-xxxxxxxxxx-xxxxx 1/1 Running 0 5mMain system pods must be in the
Runningstatus. -
Check the list of cluster participants:
talosctl \--talosconfig ./talosconfig \-e <ip_address> \-n <ip_address> \get membersSpecify
<ip_address>— the public IP address of the Control Plane server that you saved in step 3 when preparing parameters in stage 1. The dedicated server IP address can also be viewed in the control panel: in the top menu, select Products → Dedicated Servers → Servers → server card → IP address field.The output will contain information about the cluster nodes. For example:
NODE NAMESPACE TYPE ID VERSION HOSTNAME MACHINE TYPE OS ADDRESSES203.0.113.10 cluster Member talos-ee2-e9f 1 talos-ee2-e9f worker Talos (v1.13.0) ["203.0.113.12"]203.0.113.10 cluster Member talos-lv9-t5t 1 talos-lv9-t5t controlplane Talos (v1.13.0) ["203.0.113.11"]203.0.113.10 cluster Member talos-xc9-jfu 2 talos-xc9-jfu worker Talos (v1.13.0) ["203.0.113.10"]Ensure that all servers are present in the list and have the correct roles.