NOTE: The code in this repository is currently non-functional due to an issue with all released versions of the Pulumi provider for Talos Linux.
This repository contains a Pulumi program, written in Golang, to automate the process of standing up a Talos Linux cluster on Azure.
Before using the contents of this repository, you will need to ensure:
- You have the Pulumi CLI installed (see here for more information on installing Pulumi).
- You have a working Azure CLI installation.
- You have a working installation of Golang.
- You have manually installed the Pulumi provider for Talos. As of this writing, the Pulumi provider for Talos was still prerelease and needs to be installed manually; see instructions here.
-
Clone this repository into a directory on your local computer.
-
Change into the directory where you cloned this repository.
-
Run
pulumi stack init
to create a new Pulumi stack. -
Use
pulumi config set azure:location <region>
to set the desired Azure region in which to create the cluster (like "WestUS2"). -
Use
pulumi config set
to set the ID for a Talos Linux image that you've created from an uploaded VHD file. Refer to the instructions for running Talos on Azure for more details on creating your own VM image (pay attention to the "Create the Image" section). -
Run
pulumi up
to run the Pulumi program.
After the Pulumi program finishes running, you can obtain a configuration file for talosctl
using this command:
pulumi stack output talosctlCfg --show-secrets > talosconfig
Review the contents of the talosconfig
file you just created (using less
, more
, or cat
), and make note of one of the IP addresses of the control plane VMs.
You can then run this command to watch the cluster bootstrap:
talosctl --talosconfig talosconfig --nodes <cp-vm-ip-address> health
Once the cluster has finished boostrapping, you can retrieve the Kubeconfig necessary to access the cluster with this command:
talosctl --talosconfig talosconfig --nodes <cp-vm-ip-address> kubeconfig
You can then use kubectl
to access the cluster as normal, referencing the recently-retrieved Kubeconfig as necessary.