Understanding Talos
Talos provides a secure, immutable, minimal and confusing operating system for new users.
About Talos
Talos Linux is Linux designed for Kubernetes – secure, immutable, and minimal.
Developed by Siderolabs
Why should you use Talos?
- Talos is a container optimized linux distro; it is designed to be as minimal as possible while still maintaining practicality.
- Talos allows customization through the means of a machine config file that is generated along with the secrets needed to authenticate with your cluster.
- Talos will always end up configured exactly the same every time (it is immutable).
- Talos can be managed declaritively just like kubernetes. Making it easier to automate and maintain at scale.
Why shouldn’t I used Ubuntu or Debian?
- Debian-based Operating Systems are designed to be a general-purpose operating system.
- Higher attack surface. Ubuntu server is a full linux distribution with a shell, multiple packages and services enabled by default. It is harder to guarantee that the system running kubernetes hasn’t been tampered with.
- For larger clusters, managing nodes will require more complex configurations, automation, and oversight.
Getting Started with Talos
Prerequisites
Almost all of the configuration will be over the Command-Line Interface or CLI
for short.
I highly recommend installing homebrew/brew.sh if you don’t have it installed. Updating talosctl
manually is difficult and tiring.
If you have homebrew installed, you can install talosctl
via:
Windows users can also use the brew command above if brew is installed, otherwise you can download the latest talosctl
binary from here and put it in your $PATH
each time it updates.
Building Your Factory Image
Talos provides this awesome factory that helps configure and package various boot assets required for each node: https://factory.talos.dev/
The factory will guide you through creating the ideal image for your node by configuring:
- The Hardware Type
- Talos Version
- Architecture
- Secure Boot
- Extensions
Deciding What Extensions You Need
Flashing Your Image
Assuming you have somehow managed to coerce your machine into booting from the ISO, Talos will be running in mainteance mode. It is running in RAM and will not install itself to any disk without a configuration.
Finding Your Disks
While your machine is in mainteance mode, you can use the CLI
to fetch details about the machine. You will need to use the --insecure
flag as the machine does not have any configuration associated with it.
Here is the output if the machine has Talos installed:
Scouring Your Talos Filesystem
talosctl
provides the read
, list
& copy
commands for looking and pulling information from the filesystem.
This is particularly helpful for searching for the disk id’s for your drives when setting up a storage engine like longhorn or rook-ceph.
Accessing The Node (through other means)
In the case you need to interact with the node, you can create a privileged pod and enter an interactive session with it using the kubectl
tool.
-i
will keep the output open regardless if nothing is attached.-t
will allocate a output for the container.