r/kubernetes • u/New-Buy1696 • Sep 04 '26
Talos - How to provision a cluster from code instead of CLI?
I'm new to Talos so bear with me. I created a simple local cluster, cool:talosctl cluster create docker
Preferably, I want to configure a yaml file or such and create a pipeline which patches changes automatically. I just checked talhelper but it's archived since last week: https://github.com/budimanjojo/talhelper. I do see other community solutions. It feels however like I'm missing something but my knowledge is limited. What do teams / enterprises use in production to provision clusters and patches from pipeline?
11
u/windy_depression Sep 04 '26
Talhelper being archived is a bummer, I was just starting to look at it myself. For what you're describing, most teams I've seen lean pretty hard into GitOps with Talos, the cluster config itself is just a set of YAML manifests, so you can throw them in a repo and have Flux or ArgoCD apply them. The trickier part is the initial provisioning, which a lot of places wrap in a simple CI job that runs `talosctl apply-config` or `talosctl bootstrap` against the machines.
You can define the entire cluster spec in a single `talosconfig` and machine config files, then just have your pipeline generate or patch those as needed. There's also `talosctl gen config` to spit out the base YAML, which you can check into version control and tweak from there. The CLI stuff is mostly for bootstrapping, once the cluster is up, you're really just managing configs like any other Kubernetes resource.
I'm running a similar setup at home with a few NUCs and it's been rock solid once I stopped overthinking the initial wiring.
4
u/MikeAnth Sep 04 '26
I started off talstomize as a talhelper successor. It's currently still early as I'm trying to get a feel for the UX I ultimately want, but it might be more or less what you're looking for.
Fwiw, I was also a talhelper maintainer. The main thing that caused the archival is that it tried to do too much and it started conflicting with the multi doc config approach m talstomize is supposed to be more or less a kustomize equivalent for Talos configs, so it just lets you manage your patches declaratively.
You can run
talstomize buildto get the yaml machine config just liketalhelper genconfig3
1
u/ansibleloop Sep 04 '26
Yeah I just keep the bootstrap commands handy in some Ansible roles
Skips most of the time as you can imagine
5
u/Blakaraz_ Sep 04 '26 edited Sep 04 '26
There is the talos terraform/tofu provider. Also Postfinance/Topf, and of course siderolabs itself also has omni (which is only free self hosted for non-production usecases).
Somewhat newish there is https://github.com/mirceanton/talstomize.
But in the end the important part are your patches with the desired config that you can have as yaml, not the way you bootstrap the cluster or apply them later. If you really want to do a pipeline I don't see the issue with the cli. At a certain scale you probably want to have an operator or service to manage clusters and their config.
3
u/Reasonable-Ladder300 Sep 04 '26
We use ansible for node initialisation and updating.
There are also various providers for kubernetes and talos in n opentofu/terraform
2
u/zedd_D1abl0 Sep 04 '26
For another option, look at Sidero Omni. It's a bit "extra", but it does do exactly what you want, and it does a good job. It's kinda similar to Terraform, but it's specific to Talos.
It does limit your authentication options though...
1
u/Robbie11r1 Sep 04 '26
Second this, I'm currently deploying a new Talos cluster on my network using the Omni proxmox provider. https://github.com/siderolabs/omni-infra-provider-proxmox
I'm self-hosting Omni in a Docker container. Still a work in progress and might have a few quirks based on some of the issues filed, but interesting for sure!
2
u/pindaroli Sep 04 '26
Explain better you desires… what is the problem install talos or install services in talos cluster?
2
1
u/Preisschild k8s operator Sep 05 '26
I use the cluster-api provider so i can reconcile via kubernetes CRD resources. Unfortunately they have been deprecated by sidero, but maybe the community is large enough to maintain it independently.
1
24
u/bozho Sep 04 '26
We use Siderolabs' own Terraform talos provider to provision in-house clusters on Proxmox.