Talos Linux is all about declaratively managing the operating system and Kubernetes. But how can you declaratively manage the initial installation and bootstrapping of the Talos Linux Kubernetes cluster? Our new SaaS for Kubernetes deployments, Sidero Omni, allows this, as does Cluster API – but what if you are already using HashiCorp Terraform to manage infrastructure and Talos Linux for Kubernetes, as it’s the best open-source Operating System for Kubernetes?
Well, Sidero Labs now offers a HashiCorp partner-verified Terraform provider integration.
Using Terraform, you can provision your compute infrastructure on your cloud provider(s) of choice, deploy Talos Linux (using the images Sidero Labs publishes for all the cloud providers), and then pass in the created nodes to the Talos Linux Terraform provider. The Talos provider will configure the nodes as desired, as either control-plane or worker nodes, apply patches (if need be), install Kubernetes, and bootstrap etcd.
You will get back the kubeconfig and talosconfig files needed to interact securely with the cluster, as well as the controlplane and worker machine configuration files.
This enables a complete declarative model of infrastructure all the way through the Operating System to Kubernetes (which is itself declaratively managed, along with its applications.)
In practice, this means you can do cool things, such as:
- programmatically provision your infrastructure on any cloud or virtualized platform
- declaratively create and bootstrap Talos Linux and Kubernetes on those compute resources
- replicate your infrastructure/Talos/Kubernetes on different clouds
- take advantage of true cloud portability for management simplicity, cost savings, or reducing latency to your customers.
Talos Linux has the advantage of deploying exactly the same Linux, with the exact same API-based management, and the exact same Kubernetes versions, on any cloud, hypervisor, edge device or bare metal (or even inside containers.) This, in conjunction with Terraform’s support for multiple clouds, gives you cloud-agnostic deployments, and you can migrate Kubernetes deployments from one environment to another, or even run the same cluster extending across multiple environments for a truly hybrid Kubernetes cluster.
“We have many customers that are very experienced with Terraform, and rely on it heavily to manage all sorts of systems. Allowing them to rely on Terraform to automate their Talos Linux Kubernetes clusters is something they’ve been requesting for a while. Publishing our Terraform provider reduces a barrier to deployment for those teams, and makes it simpler for them to realize the security and reliability of a minimal, immutable Kubernetes-specific Operating System,” said Andrew Rynhard, Founder and CTO of Sidero Labs.
Setting up the Talos provider is quite simple – there are example configurations on the Terraform Registry here. You simply set up your cluster name, K8s cluster endpoint (most likely a load balancer already created by Terraform in your cloud provider), and the set of control plane and worker nodes.
This is the first initiative from Sidero Labs’ partnership with HashiCorp, but we expect more integrations in the future, which we will announce here and on our HashiCorp partner page.