Skip to content

Add tutorial: Ephemeral Kubernetes clusters on Hetzner with kobe - #1502

Open
0xPxt wants to merge 2 commits into
hetzneronline:masterfrom
0xPxt:ephemeral-kubernetes-clusters-with-kobe
Open

Add tutorial: Ephemeral Kubernetes clusters on Hetzner with kobe#1502
0xPxt wants to merge 2 commits into
hetzneronline:masterfrom
0xPxt:ephemeral-kubernetes-clusters-with-kobe

Conversation

@0xPxt

@0xPxt 0xPxt commented Jul 29, 2026

Copy link
Copy Markdown

This tutorial provisions one small Hetzner Cloud server, runs the open-source kobe operator on it, and from then on leases warm, disposable k3s clusters from a pool.

I have read and understood the Contributor's Certificate of Origin available at the end of
https://raw.githubusercontent.com/hetzneronline/community-content/master/tutorial-template.md and I hereby certify that I meet the contribution criteria described in it.
Signed-off-by: Aleix Raventos aleix.raventos@zondax.ch

Add a tutorial that provisions a small Hetzner Cloud server, runs the
kobe operator on it, and leases warm, disposable k3s clusters from a
pool in a few seconds each. It covers provisioning the server with
OpenTofu, installing the operator from its published Helm chart,
applying the ClusterPool and AccessPolicy custom resources, leasing a
cluster and deploying a workload into it, and tearing everything down
again so nothing keeps billing.

Signed-off-by: Aleix Raventós <aleix.raventos@zondax.ch>
@svenja11 svenja11 added the review wanted Request a review label Aug 7, 2026
@svenja11

Copy link
Copy Markdown
Collaborator

Thank you for your contribution @0xPxt!

In step 2, I ran into an error:

holu@example:~/kobe/demo/hetzner$ ./demo tf up

[...]

Plan: 4 to add, 0 to change, 0 to destroy.

Changes to Outputs:
  + join_token      = (known after apply)
  + kubeconfig_path = "/home/holu/.kube/hetzner-kobe-demo-config"
╷
│ Error: 2001:db8:5678::1/32 is not the start of the cidr block 2001:db8::/32
│
│   with hcloud_firewall.demo,
│   on main.tf line 61, in resource "hcloud_firewall" "demo":
│   61: resource "hcloud_firewall" "demo" {
│
╵
╷
│ Error: 2001:db8:5678::1/32 is not the start of the cidr block 2001:db8::/32
│
│   with hcloud_firewall.demo,
│   on main.tf line 61, in resource "hcloud_firewall" "demo":
│   61: resource "hcloud_firewall" "demo" {
│
╵
╷
│ Error: 2001:db8:5678::1/32 is not the start of the cidr block 2001:db8::/32
│
│   with hcloud_firewall.demo,
│   on main.tf line 61, in resource "hcloud_firewall" "demo":
│   61: resource "hcloud_firewall" "demo" {
│
╵

==> Outputs
$ /usr/bin/terraform -chdir=/home/holu/kobe/demo/hetzner/terraform output
╷
│ Warning: No outputs found
│
│ The state file either has no outputs defined, or all the defined outputs are empty. Please define an output in your
│ configuration with the `output` keyword and run `terraform refresh` for it to become available. If you are using
│ interpolation, please verify the interpolated value is not empty. You can use the `terraform console` command to
│ assist.
╵
Done. Next:
  export HCLOUD_TOKEN=...                         # already set
  ./demo up                                       # helm install
  ./demo tunnel                                   # terminal B

It looks like https://icanhazip.com returned the IPv6 and caused an error. On my local device, I replaced this line in kobe/demo/hetzner/terraform/main.tf for a quick fix:

# Old line
  api_cidr = var.allowed_api_cidr != "" ? var.allowed_api_cidr : "${data.external.my_ip[0].result.ip}/32"

# New line
  api_cidr = var.allowed_api_cidr != "" ? var.allowed_api_cidr : "203.0.113.1/32"

Can you please update main.tf in the repository so that it grabs the IPv4 address automatically?



FYI You can check your IP at https://ip.hetzner.com/ as well:

curl -4 https://ip.hetzner.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs action Something has to be updated

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants