profile picture

Introducing my first CLI tool

June 30, 2025 - tools kubernetes homelab claude ai ai-assisted-programming

Hello! It's been a while since I wrote something on my blog. Recently, I have been using a tool called hetzner-k3s to create disposable Kubernetes clusters on Hetzner. It's a very convenient and robust tool for my need. However, with how easy it is to create clusters with that tool, it is also easy to just fire-and-forget and then wake up with a surprise bill by the end of the month.

With the fear of racking up a huge bill in mind, I decided to utilize my homelab to deploy those clusters. Inspired by hetzner-k3s, I developed a similar tool, but for Proxmox, called proxmox-k3s. It is written in Go, and development is assisted by Claude right from the start.

It is very easy to use if you have a single-node Proxmox instance. After you download the tool, you can get started with this:

# Minimal Proxmox-K3s Configuration
# Single-node K3s cluster for quick testing

proxmox:
  # Proxmox VE API endpoint
  endpoint: "https://pve:8006/api2/json"
  
  # Authentication
  username: "user@pam"
  password: "your-user-password5"

  # Needed for some actions
  ssh:
    username: "user"
    password: "ssh-password5"
    port: 22

  # Proxmox node where VMs will be created
  node: "pve"
  skip_tls_verify: true        # Only for instances with self-signed certs
  auto_create_templates: true  # Lets the CLI create the VM templates for you

cluster:
  name: "minimal-k3s"
  k3s_version: "v1.32.5+k3s1"
  kubeconfig_path: "./kubeconfig-minimal"

master_nodes:
  - name: "master"
    count: 1
    template: "ubuntu-24.04-cloudinit"
    memory: 2048
    cores: 2
    storage: "local-lvm"
    disk_size: "20G"
    network: "vmbr0"

networking:
  ssh:
    public_key_path: "~/./ssh/id_rsa.pub"
    private_key_path: "~/.ssh/id_rsa"

It is not favorable, but to ensure a smooth default operations it is recommended to use the root account with the CLI. There are some limitations that makes the CLI has to use the root account instead of another account. I hope that it can be tackled in the future.

For now, it fulfills my need to easily create disposable Kubernetes clusters. I plan to introduce more things as my need grows. If you have similar needs, you might want to check the tool on Github. Please keep in mind that I only use it for hobby and have not extensively tested it, so it is not recommended for production.

References