Attempts to create Kubernetes cluster out of Hetzner cloud.
Requirements
| Tool | Version | Reason | Install |
|---|---|---|---|
docker |
~ v19.03.5 |
Build container images | docker.com |
kubectl |
~v1.16 |
Interact with the kube api | kubernetes.io |
terraform |
~ v0.12.25 |
Infrastructure as code platform | terraform.io |
ssh-agent |
? |
Save your ssh key | ssh-agent |
- Make sure everything is installed
- Make an account with Hetzner cloud (https://www.hetzner.com/cloud)
- Make a cloudflare account (https://www.cloudflare.com/)
- Make a file named:
variables.tfin the./infrafolder based onvariables-examples.tf.txt - Fill the new
variables.tfwith your data or append yourenvwith the keys - Go into
provisioningfolder and runterraform init - Go into
hardeningfolder and runterraform init - Make
install-infra.shexecutable - You might have to make other
.shfile executable inside theprovisioningand thehardeningfolder (depends on you setup) - Run the
install-infra.shscript. The terraform scripts are executed byinstall-infraone after the other.
This project is creating a Kubernetes cluster on Hetzner Cloud and using Cloudflare. The X nodes talk together using a private VPN.
This script is also trying to install the latest available kubernetes version.
Sample Results:
From Hetzner Dashboard
Those IPs are not used anymore ;)
The first hardening is about securing the VM and not in the Kubernetes cluster. The script is based on the work of konstruktoid/hardening and the goal is to harden the VM before hardening the "Kubernetes layer"
This project is made from other projects:
- Kubernetes Cluster Creation Script (https://github.com/hobby-kube/provisioning)
- Hardening Scripts (https://github.com/konstruktoid/hardening)

