Skip to content

Commit

Permalink
docs: add lost steps in bootstrap
Browse files Browse the repository at this point in the history
add variant to upload image

Signed-off-by: PRIHLOP <ilya.prihlop@gmail.com>
  • Loading branch information
PRIHLOP committed Dec 16, 2024
1 parent 5823606 commit cb9035e
Showing 1 changed file with 49 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ aliases:
Hetzner Cloud does not support uploading custom images.
You can email their support to get a Talos ISO uploaded by following [issues:3599](https://github.com/siderolabs/talos/issues/3599#issuecomment-841172018) or you can prepare image snapshot by yourself.

There are two options to upload your own.
There are three options to upload your own.

1. Run an instance in rescue mode and replace the system OS with the Talos image
2. Use [Hashicorp packer](https://www.packer.io/docs/builders/hetzner-cloud) to prepare an image
3. Use special utility [hcloud-upload-image] (https://github.com/apricote/hcloud-upload-image/)

### Rescue mode

Expand Down Expand Up @@ -145,6 +146,29 @@ export IMAGE_ID=<image-id-in-packer-output>

After doing this, you can find the snapshot in the console interface.

### hcloud-upload-image

Install process described [here](https://github.com/apricote/hcloud-upload-image/?tab=readme-ov-file#getting-started)(you can download binary or build from source, it is also possible to use Docker).

For process simplification you can use this bash script:
```bash
#!/usr/bin/env bash
export TALOS_IMAGE_VERSION=v1.8.4 # You can change to the current version
export TALOS_IMAGE_ARC=amd64 # You can change to arm architecture
export HCLOUD_SERVER_ARC=x86 # HCloud server architecture can be x86 or arm
export PACKAGE_INSTALL_COMMAND="apt install"
wget https://github.com/siderolabs/talos/releases/download/$TALOS_IMAGE_VERSION/metal-$TALOS_IMAGE_ARC.raw.zst
$PACKAGE_INSTALL_COMMAND zstd xz
unzstd --rm *.zst
xz -T 0 *.raw
hcloud-upload-image upload \
--image-path *.xz \
--architecture $HCLOUD_SERVER_ARC \
--compression xz
```

After these actions, you can find the snapshot in the console interface.

## Creating a Cluster via the CLI

This section assumes you have the [hcloud console utility](https://community.hetzner.com/tutorials/howto-hcloud-cli) on your local machine.
Expand Down Expand Up @@ -255,6 +279,13 @@ This can be found by issuing:
hcloud server list | grep talos-control-plane
```

Before the bootstrap process, you need to apply controlplane config to the first node:
```bash
talosctl apply-config --insecure \
--nodes <control-plane-1-IP> \
--file controlplane.yaml
```

Set the `endpoints` and `nodes` for your talosconfig with:

```bash
Expand All @@ -268,6 +299,23 @@ Bootstrap `etcd` on the first control plane node with:
talosctl --talosconfig talosconfig bootstrap
```

After a successful bootstrap, you need to add other control plane nodes:
```bash
talosctl apply-config --insecure \
--nodes <control-plane-N-IP> \
--file controlplane.yaml
```
and worker nodes, if you require that
```bash
talosctl apply-config --insecure \
--nodes <worker-N-IP> \
--file worker.yaml
```
After a while, you should see that all the members have joined:
```bash
talosctl --talosconfig talosconfig -n <control-plane-1-IP> get members
```

### Retrieve the `kubeconfig`

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

0 comments on commit cb9035e

Please sign in to comment.