Talos Linux

Einfache K8s Installationen

Wat'n dat? 🤔

  • Ein FOSS Kubernetes Betriebssystem ähnlich zu CoreOS/FlatCar
  • Wird von SideroLabs entwickelt
  • SideroLabs bietet es als SaaS an
  • Hat nur das nötigste installiert
  • Bietet eine einfache Art K8s zu installieren und zu verwalten

Ok und was kann das?

  • Volles K8s
  • Ephemeral (Läuft komplett im RAM mit SquashFS)
  • Keine Shell und kein SSH
  • Überall TLS
  • Immutable (Read-only Filesystem)
  • Einfaches CLI Tool zum verwalten des ganzen clusters
  • Konfiguration per YAML Datei
  • Einfache etcd Backups/Recovery
  • Einfache Kubernetes Updates

Aha und warum nicht einfach K3s?

  • K3s läuft mit SQLite oder einer externen Datenbank (Postgresql z.Bsp.)
  • Talos benutzt eine replizierte etcd Datenbank für den Cluster-State
  • K3s ist eingeschränkter im Funktionsumfang

Und wie installier ich das?

  1. talosctl runterladen:
    curl -sL https://talos.dev/install | sh
  2. ISO herunterladen:

    👁️ https://github.com/siderolabs/talos/releases (metal)
    Alternativ mit
    talosctl cluster create
    lokalen Test-Cluster erstellen (→ Schritt 10 springen)
  3. Server mit ISO booten

Und wie installier ich das?

Und wie installier ich das?

Und wie installier ich das?

  1. Config generieren:

                            talosctl gen config
    my-name
    https://$CONTROL_PLANE_IP:6443
    --output-dir _out
                        
  2. _out/worker.yaml und _out/controllplane.yaml configs bearbeiten

    👁️ https://www.talos.dev/v1.5/talos-guides/configuration/

Und wie installiere ich das?

  1. Controllplane installieren:

talosctl apply-config
--insecure
-n $CONTROL_PLANE_IP
--file _out/controlplane.yaml

Und wie installiere ich das?

  1. Controllplane installieren:

    talosctl apply-config
    --insecure
    -n $CONTROL_PLANE_IP
    --file _out/controlplane.yaml
  2. Worker installieren:

    talosctl apply-config
    --insecure
    -n $WORKER_IP
    --file _out/worker.yaml

Und wie installier ich das?

Und wie installier ich das?

Und wie installier ich das?

  1. In der Talos config die IP der Controllplane setzen:

    export TALOSCONFIG="_out/talosconfig"
    talosctl config endpoint $CONTROL_PLANE_IP
    talosctl config node $CONTROL_PLANE_IP
    (Nach export -n nicht mehr benötigt)

Und wie installier ich das?

  1. In der Talos config die IP der Controllplane setzen:

    export TALOSCONFIG="_out/talosconfig"
    talosctl config endpoint $CONTROL_PLANE_IP
    talosctl config node $CONTROL_PLANE_IP
    (Nach export -n nicht mehr benötigt)
  2. etcd bootstrap:

    talosctl -n $CONTROL_PLANE_IP bootstrap
  3. kubeconfig speichern:

    talosctl -n $CONTROL_PLANE_IP kubeconfig .
Fertig 🥳
Healthcheck
talosctl health
Dashboard
talosctl dashboard
etcd Backups

Am besten per cronjob!

talosctl -n $CONTROL_PLANE_IP etcd snapshot db.snapshot

talosctl -n $CONTROL_PLANE_IP bootstrap
--recover-from=./db.snapshot
Kubernetes Updates
talosctl -n $CONTROL_PLANE_IP
upgrade-k8s --to 1.28.2
Talos Updates
talosctl upgrade -n NODE_IP_1,NODE_IP_2
--image ghcr.io/siderolabs/installer:v1.5.0

Danke für eure Aufmerksamheit 😊

Proxmox Installationsanleitung https://www.talos.dev/v1.5/talos-guides/install/virtualized-platforms/proxmox/
FluxCD Empfehlung https://fluxcd.io/
Fediverse @Yonggan@iceshrimp.de
Matrix @yonggan:matrixapp.chat
Slides https://talos.obco.pro/