https://github.com/winterhart/hetzpuff
Kubernetes cluster out of Hetzner cloud
https://github.com/winterhart/hetzpuff
hardening hetzner kubernetes security terraform
Last synced: 2 months ago
JSON representation
Kubernetes cluster out of Hetzner cloud
- Host: GitHub
- URL: https://github.com/winterhart/hetzpuff
- Owner: Winterhart
- License: agpl-3.0
- Created: 2020-05-17T18:53:07.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-05-18T18:13:47.000Z (about 6 years ago)
- Last Synced: 2024-10-17T16:49:16.930Z (over 1 year ago)
- Topics: hardening, hetzner, kubernetes, security, terraform
- Language: HCL
- Homepage:
- Size: 123 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Hetzpuff
Attempts to create Kubernetes cluster out of Hetzner cloud.
## Running
**Requirements**
Tool | Version | Reason | Install
---------- | ------------ | ------------------------------ | ------------------------------------------------------------------------------
`docker` | `~ v19.03.5` | Build container images | [docker.com](https://docs.docker.com/install/#supported-platforms)
`kubectl` | `~v1.16` | Interact with the kube api | [kubernetes.io](https://kubernetes.io/docs/tasks/tools/install-kubectl/)
`terraform` | `~ v0.12.25` | Infrastructure as code platform | [terraform.io](https://www.terraform.io/)
`ssh-agent` | `?` | Save your ssh key | [ssh-agent](https://linux.die.net/man/1/ssh-agent)
## Instruction
- 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 on `variables-examples.tf.txt`
- Fill the new `variables.tf` with your data or append your `env` with the keys
- Go into `provisioning` folder and run `terraform init`
- Go into `hardening` folder and run `terraform init`
- Make `install-infra.sh` executable
- You might have to make other `.sh` file executable inside the `provisioning` and the `hardening` folder (depends on you setup)
- Run the `install-infra.sh` script. The terraform scripts are executed by `install-infra` one after the other.
## Cluster
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 ;)
## Hardening
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"
## Source
This project is made from other projects:
- Kubernetes Cluster Creation Script (https://github.com/hobby-kube/provisioning)
- Hardening Scripts (https://github.com/konstruktoid/hardening)