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.tf
in the./infra
folder based onvariables-examples.tf.txt
- Fill the new
variables.tf
with your data or append yourenv
with the keys - Go into
provisioning
folder and runterraform init
- Go into
hardening
folder and runterraform init
- Make
install-infra.sh
executable - You might have to make other
.sh
file executable inside theprovisioning
and thehardening
folder (depends on you setup) - Run the
install-infra.sh
script. The terraform scripts are executed byinstall-infra
one 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)