Skip to main content

Creating a cluster via the CLI

In this guide we will create an HA Kubernetes cluster with 1 worker node. We assume existing Blob Storage, and some familiarity with Azure. If you need more information on Azure specifics, please see the official Azure documentation.

Environment setup

We’ll make use of the following environment variables throughout the setup. Edit the variables below with your correct information.

Create the image

First, download the Azure image from Image Factory. Once downloaded, untar with tar -xvf /path/to/azure-amd64.tar.gz

Upload the VHD

Once you have pulled down the image, you can upload it to blob storage with:

Register the image

Now that the image is present in our blob storage, we’ll register it.

Network infrastructure

Virtual networks and security groups

Once the image is prepared, we’ll want to work through setting up the network. Issue the following to create a network security group and add rules to it.

Load balancer

We will create a public ip, load balancer, and a health check that we will use for our control plane.

Network interfaces

In Azure, we have to pre-create the NICs for our control plane so that they can be associated with our load balancer.

Cluster configuration

With our networking bits setup, we’ll fetch the IP for our load balancer and create our configuration files.

Compute creation

We are now ready to create our azure nodes. Azure allows you to pass Talos machine configuration to the virtual machine at bootstrap time via user-data or custom-data methods. Talos supports only custom-data method, machine configuration is available to the VM only on the first boot.

Manual image upload

Bootstrap etcd

You should now be able to interact with your cluster with talosctl. We will need to discover the public IP for our first control plane node first.
Set the endpoints and nodes:
Bootstrap etcd:

Retrieve the kubeconfig

At this point we can retrieve the admin kubeconfig by running: