# vitobotta/hetzner-k3s

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/vitobotta-hetzner-k3s).**

3,299 stars · 201 forks · Crystal · mit

## Links

- GitHub: https://github.com/vitobotta/hetzner-k3s
- Homepage: https://hetzner-k3s.com/
- awesome-repositories: https://awesome-repositories.com/repository/vitobotta-hetzner-k3s.md

## Topics

`crystal` `crystal-lang` `crystal-language` `devops` `docker` `hetzner` `hetzner-api` `hetzner-cloud` `k3s` `k8s` `kubernetes`

## Description

This project is a cloud provisioner and orchestrator for deploying and managing K3s clusters on Hetzner Cloud. It automates the setup of lightweight Kubernetes environments, including the provisioning of load balancers, private networks, and firewalls.

The tool functions as a lifecycle manager capable of performing zero-downtime rolling updates and version upgrades across distributed environments. It distinguishes itself through a cluster autoscaler that adjusts worker node counts based on resource demand and a system for converting single-master setups into multi-master, high-availability clusters distributed across multiple geographic regions.

Broad capabilities include the management of heterogeneous node pools with custom operating system images and the integration of cloud-native block storage for persistent volumes. It also provides infrastructure-level security via firewall configuration, scheduled cluster state backups, and image distribution optimization using peer-to-peer mirroring to reduce bandwidth.

## Tags

### DevOps & Infrastructure

- [Hetzner Kubernetes Provisioners](https://awesome-repositories.com/f/devops-infrastructure/hetzner-kubernetes-provisioners.md) — Automates the deployment of lightweight K3s clusters on Hetzner Cloud including networking and firewalls.
- [Lightweight Cluster Provisioning](https://awesome-repositories.com/f/devops-infrastructure/lightweight-cluster-provisioning.md) — Provisions lightweight Kubernetes environments on Hetzner Cloud with automated networking and firewalling. ([source](https://vitobotta.github.io/hetzner-k3s/))
- [Cluster Lifecycle Managers](https://awesome-repositories.com/f/devops-infrastructure/cluster-lifecycle-managers.md) — Performs zero-downtime rolling updates and version upgrades across distributed K3s environments.
- [Kubernetes Cluster Autoscalers](https://awesome-repositories.com/f/devops-infrastructure/cluster-scaling-orchestrators/kubernetes-cluster-autoscalers.md) — Provides a cluster autoscaler that automatically adjusts worker node counts based on resource demand.
- [Elastic Load Balancers](https://awesome-repositories.com/f/devops-infrastructure/container-orchestration/networking/load-balancing/elastic-load-balancers.md) — Automatically provisions and configures cloud-native load balancers to distribute external traffic across cluster nodes. ([source](https://vitobotta.github.io/hetzner-k3s/))
- [Rolling Update Controllers](https://awesome-repositories.com/f/devops-infrastructure/container-orchestration/workload-scheduling-scaling/rolling-update-controllers.md) — Provides a system controller to execute sequential node replacements for zero-downtime software updates.
- [High Availability Conversions](https://awesome-repositories.com/f/devops-infrastructure/high-availability-clusters/high-availability-conversions.md) — Transforms single-master setups into multi-master clusters by adding nodes and configuring load balancers. ([source](https://vitobotta.github.io/hetzner-k3s/Maintenance/))
- [Multi-Region Cluster High Availability](https://awesome-repositories.com/f/devops-infrastructure/high-availability-services/multi-region-cluster-high-availability.md) — Sets up multi-master nodes across different geographic locations to ensure service resilience.
- [Cluster Autoscaling](https://awesome-repositories.com/f/devops-infrastructure/infrastructure-scaling/role-based-scaling/cattle-based-node-scaling/cluster-autoscaling.md) — Implements a cluster autoscaler that dynamically adjusts worker node counts to match fluctuating resource demand.
- [Node Pool Scaling](https://awesome-repositories.com/f/devops-infrastructure/infrastructure-scaling/role-based-scaling/cattle-based-node-scaling/node-pool-scaling.md) — Adjusts the number of nodes in a pool by updating configuration and synchronizing cloud state. ([source](https://vitobotta.github.io/hetzner-k3s/Maintenance/))
- [Production Cluster Deployers](https://awesome-repositories.com/f/devops-infrastructure/infrastructure/infrastructure-as-code/management/infrastructure-orchestration/production-cluster-deployers.md) — Automates the provisioning of production-grade infrastructure including load balancers, private networks, and firewalls. ([source](https://cdn.jsdelivr.net/gh/vitobotta/hetzner-k3s@main/README.md))
- [Kubernetes Cluster Management](https://awesome-repositories.com/f/devops-infrastructure/kubernetes-cluster-management.md) — Manages the operational lifecycle of Kubernetes clusters, including rolling updates and security patches.
- [Cluster Autoscalers](https://awesome-repositories.com/f/devops-infrastructure/kubernetes-cluster-management/cluster-autoscalers.md) — Automatically adjusts the number of worker nodes in a pool based on resource demand.
- [Multi-Region Control Planes](https://awesome-repositories.com/f/devops-infrastructure/multi-region-control-planes.md) — Deploys master nodes across multiple geographic locations with load balancers to ensure regional resilience.
- [Declarative Infrastructure Synchronizers](https://awesome-repositories.com/f/devops-infrastructure/scalable-infrastructure-planning/infrastructure-change-diffs/declarative-infrastructure-synchronizers.md) — Synchronizes cloud infrastructure and node pools by matching the environment state to a declarative configuration file.
- [Worker Scaling](https://awesome-repositories.com/f/devops-infrastructure/worker-scaling.md) — Adjusts the number of worker nodes in a pool based on resource demand and timing parameters. ([source](https://vitobotta.github.io/hetzner-k3s/Creating_a_cluster/))
- [Cloud Backups](https://awesome-repositories.com/f/devops-infrastructure/cloud-backups.md) — Schedules periodic snapshots of the cluster state and stores them in cloud buckets for disaster recovery.
- [Cloud Block Storage Provisioning](https://awesome-repositories.com/f/devops-infrastructure/cloud-block-storage-provisioning.md) — Integrates cloud-native block storage to provide persistent volumes for applications.
- [Heterogeneous Node Pools](https://awesome-repositories.com/f/devops-infrastructure/cluster-node-management/heterogeneous-node-pools.md) — Deploys multiple groups of instances using different architectures or machine types within a single cluster. ([source](https://hetzner-k3s.com/))
- [Cluster Upgrades](https://awesome-repositories.com/f/devops-infrastructure/cluster-upgrades.md) — Executes rolling updates of the cluster using a system controller to maintain service availability. ([source](https://vitobotta.github.io/hetzner-k3s/))
- [Peer-to-Peer Mirrors](https://awesome-repositories.com/f/devops-infrastructure/container-orchestration/image-management-tools/container-image-distribution/peer-to-peer-mirrors.md) — Optimizes container image distribution using peer-to-peer mirroring to reduce external bandwidth and accelerate node startup. ([source](https://vitobotta.github.io/hetzner-k3s/Recommendations/))
- [Custom Node Images](https://awesome-repositories.com/f/devops-infrastructure/custom-node-images.md) — Allows specifying custom operating system images or snapshot IDs for node pools to support specific architectures. ([source](https://vitobotta.github.io/hetzner-k3s/Creating_a_cluster/))
- [Unattended Security Updates](https://awesome-repositories.com/f/devops-infrastructure/unattended-security-updates.md) — Configures services to enable unattended operating system security upgrades on all nodes. ([source](https://vitobotta.github.io/hetzner-k3s/Maintenance/))
- [Zero-Downtime Upgrades](https://awesome-repositories.com/f/devops-infrastructure/zero-downtime-upgrades.md) — Updates cluster software without interrupting running services using a system upgrade controller. ([source](https://hetzner-k3s.com/))

### Data & Databases

- [High Availability Architectures](https://awesome-repositories.com/f/data-databases/high-availability-architectures.md) — Deploys master and worker nodes across multiple regional locations to ensure service resilience. ([source](https://cdn.jsdelivr.net/gh/vitobotta/hetzner-k3s@main/README.md))
- [Cluster Backups](https://awesome-repositories.com/f/data-databases/consistency-tuning/point-in-time-snapshots/cluster-backups.md) — Schedules periodic snapshots of the cluster state and stores them in cloud buckets to prevent data loss. ([source](https://vitobotta.github.io/hetzner-k3s/Creating_a_cluster/))
- [Persistent Storage Management](https://awesome-repositories.com/f/data-databases/persistent-storage-management.md) — Integrates cloud block storage to provide persistent volumes for applications requiring permanent data storage. ([source](https://vitobotta.github.io/hetzner-k3s/))
- [Persistent Storage Volumes](https://awesome-repositories.com/f/data-databases/persistent-storage-volumes.md) — Integrates cloud-native block storage to dynamically create and attach persistent disks to cluster nodes.

### Networking & Communication

- [Cluster Network Orchestration](https://awesome-repositories.com/f/networking-communication/cluster-network-orchestration.md) — Configures internal cluster communication over private networks and manages interface providers. ([source](https://cdn.jsdelivr.net/gh/vitobotta/hetzner-k3s@main/README.md))
- [Private Network Connectivity](https://awesome-repositories.com/f/networking-communication/private-networks/private-network-connectivity.md) — Routes internal cluster communication over isolated private cloud networks with infrastructure-level firewalls.

### Security & Cryptography

- [Firewall Configurations](https://awesome-repositories.com/f/security-cryptography/firewall-configurations.md) — Defines inbound and outbound firewall rules and port ranges to secure cluster nodes. ([source](https://vitobotta.github.io/hetzner-k3s/Creating_a_cluster/))
- [Private Network Security](https://awesome-repositories.com/f/security-cryptography/private-network-security.md) — Implements infrastructure-level firewalls and isolates internal cluster traffic over private cloud networks. ([source](https://hetzner-k3s.com/))

### Operating Systems & Systems Programming

- [Provisioning Scripts](https://awesome-repositories.com/f/operating-systems-systems-programming/terminal-command-line-environments/shells-scripting/provisioning-scripts.md) — Executes custom shell scripts during deployment to handle OS updates and network routing requirements.

### Software Engineering & Architecture

- [Node Pool Optimization](https://awesome-repositories.com/f/software-engineering-architecture/node-lifecycle-management/distributed-node-lifecycles/node-pool-optimization.md) — Distributes workloads across different instance types and geographic locations to optimize performance and cost. ([source](https://cdn.jsdelivr.net/gh/vitobotta/hetzner-k3s@main/README.md))

### Part of an Awesome List

- [CLI Utilities](https://awesome-repositories.com/f/awesome-lists/devtools/cli-utilities.md) — CLI tool to manage Kubernetes clusters in Hetzner Cloud
