Skip to content
This repository has been archived by the owner on Oct 5, 2021. It is now read-only.

Create a single node Kubernetes cluster on Hetzner cloud

License

Notifications You must be signed in to change notification settings

windsource/k8s-setup-hetzner-cloud

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Install Kubernetes on a Hetzner cloud server

This setup uses terraform to create a single instance Hetzner cloud server and installs Kubernetes using kubeadm on it.

Features

Requirements

  • Terraform >= v0.12.0 must be installed

Setup

Create a file terraform.tfvars with

hcloud_token = "<your Hetzner API token>"
ssh_keys = ["<your Hetzner cloud ssh key to use for the server>"]
private_ssh_key_path = "<path to local ssh key>"
email = "<email to use for Let's Encrypt registration>"
master-node-name = "<node name>"

Then call

terraform init

Deploy

terraform apply

Destroy

terraform destroy

Access dashboard

Get a token using

kubectl -n kubernetes-dashboard describe secret $(kubectl -n kubernetes-dashboard get secret | grep admin-user | awk '{print $1}')

Start a proxy with kubectl proxy.

Then goto http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/.

Access Prometheus

Forward the port using

kubectl --namespace monitoring port-forward svc/prometheus-k8s 9090

Then goto http://localhost:9090/

Access Grafana

Forward the port using

kubectl --namespace monitoring port-forward svc/grafana 3000

Then goto http://localhost:3000/ and use user/password admin/admin.

Access Alert Manager

Forward the port using

kubectl --namespace monitoring port-forward svc/alertmanager-main 9093

Then goto http://localhost:9093/

About

Create a single node Kubernetes cluster on Hetzner cloud

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published