This is the multi-page printable view of this section. Click here to print.
Introduction
1 - What is Talos?
Talos is an open source platform to host and maintain Kubernetes clusters. It includes a purpose-built operating system and associated management tools. It can run on all major cloud providers, virtualization platforms, and bare metal hardware.
All system management is done via an API, and there is no shell or interactive console. Some of the capabilities and benefits provided by Talos include:
- Security: Talos reduces your attack surface by practicing the Principle of Least Privilege (PoLP) and by securing the API with mutual TLS (mTLS) authentication.
- Predictability: Talos eliminates unneeded variables and reduces unknown factors in your environment by employing immutable infrastructure ideology.
- Evolvability: Talos simplifies your architecture and increases your ability to easily accommodate future changes.
Talos is flexible and can be deployed in a variety of ways, but the easiest way to get started and experiment with the system is to run a local cluster on your laptop or workstation. There are two options:
- Run a Docker-based local cluster on your Linux or Mac workstation
- Run a Firecracker micro-VM-based cluster on your Linux workstation
2 - Quickstart
In this guide we will create a Kubernetes cluster in Docker, using a containerized version of Talos.
Running Talos in Docker is intended to be used in CI pipelines, and local testing when you need a quick and easy cluster. Furthermore, if you are running Talos in production, it provides an excellent way for developers to develop against the same version of Talos.
Requirements
The follow are requirements for running Talos in Docker:
- Docker 18.03 or greater
- a recent version of
talosctl
Create the Cluster
Creating a local cluster is as simple as:
talosctl cluster create --wait
Once the above finishes successfully, your talosconfig(~/.talos/config
) will be configured to point to the new cluster.
If you are running on MacOS, an additional command is required:
talosctl config --endpoints 127.0.0.1
Note: Startup times can take up to a minute before the cluster is available.
Retrieve and Configure the kubeconfig
talosctl kubeconfig .
kubectl --kubeconfig kubeconfig config set-cluster talos-default --server https://127.0.0.1:6443
Using the Cluster
Once the cluster is available, you can make use of talosctl
and kubectl
to interact with the cluster.
For example, to view current running containers, run talosctl containers
for a list of containers in the system
namespace, or talosctl containers -k
for the k8s.io
namespace.
To view the logs of a container, use talosctl logs <container>
or talosctl logs -k <container>
.
Cleaning Up
To cleanup, run:
talosctl cluster destroy
3 - System Requirements
Minimum Requirements
Role | Memory | Cores |
---|---|---|
Init/Control Plane | 2GB | 2 |
Worker | 1GB | 1 |
Recommended
Role | Memory | Cores |
---|---|---|
Init/Control Plane | 4GB | 4 |
Worker | 2GB | 2 |
These requirements are similar to that of kubernetes.