Creating Talos Kubernetes cluster using QEMU VMs.
/dev/kvm
must exist)CONFIG_NET_SCH_NETEM
enabledCONFIG_NET_SCH_INGRESS
enabledCAP_SYS_ADMIN
and CAP_NET_ADMIN
capabilitiesbridge
, static
and firewall
CNI plugins from the standard CNI plugins, and tc-redirect-tap
CNI plugin from the awslabs tc-redirect-tap installed to /opt/cni/bin
(installed automatically by talosctl
)/var/run/netns
directory should existtalosctl
on MacOS and Linux via:
vmlinuz
) and initramfs (initramfs.xz
).
These files can be downloaded from the Talos release:
talosctl
will download the CNI bundle for the VM provisioning and install it to ~/.talos/cni
directory.
Once the above finishes successfully, your talosconfig (~/.talos/config
) will be configured to point to the new cluster, and kubeconfig
will be
downloaded and merged into default kubectl config location (~/.kube/config
).
Cluster provisioning process can be optimized with registry pull-through caches.
talosctl
and kubectl
to interact with the cluster.
For example, to view current running containers, run talosctl -n 10.5.0.2 containers
for a list of containers in the system
namespace, or talosctl -n 10.5.0.2 containers -k
for the k8s.io
namespace.
To view the logs of a container, use talosctl -n 10.5.0.2 logs <container>
or talosctl -n 10.5.0.2 logs -k <container>
.
A bridge interface will be created, and assigned the default IP 10.5.0.1.
Each node will be directly accessible on the subnet specified at cluster creation time.
A loadbalancer runs on 10.5.0.1 by default, which handles loadbalancing for the Kubernetes APIs.
You can see a summary of the cluster state by running:
Note: In that case that the host machine is rebooted before destroying the cluster, you may need to manually remove ~/.talos/clusters/talos-default
.
talosctl cluster destroy
command depends heavily on the clusters state directory.
It contains all related information of the cluster.
The PIDs and network associated with the cluster nodes.
If you happened to have deleted the state folder by mistake or you would like to cleanup
the environment, here are the steps how to do it manually:
talosctl qemu-launch
:
qemu-system
:
talosctl loadbalancer-launch
:
talosctl dhcpd-launch
:
state.yaml
in the
~/.talos/clusters/<cluster-name>
directory.
talos<uuid>
<cluster-name>-<role>-<node-id>.log
For example in case of k8s cluster name: