This repository is part of a live demo at KubeCon Europe 2022 that shows how different official integrations can be used to deploy a Kubernetes (k3s) cluster at Hetzner Cloud.
The code in this repository creates chargeable resources (three servers, a volume and a load balancer) in your hcloud account. Please make sure to delete the resources afterwards to avoid unintended costs. If you attended KubeCon you received a coupon for some cloud credits which you can use to cover the costs to get started.
After the KubeCon this repository will not be updated or officially supported. If you think there is a bug with one of the integrations please feel free to open an issue in the corresponding GitHub repository or a customer ticket.
- If you don't have an account yet, create one
- Login to your hcloud account
- Redeem your cloud credits if you received some at the KubeCon
- Create a new hcloud project
- Go to the project settings at
Security > API Tokens
and create a new token withRead & Write
access - Export the new token:
export HCLOUD_TOKEN=<your token>
- Clone the repository
git clone https://github.com/hetznercloud/kubecon-europe-2022.git
cd kubecon-europe-2022
Replace the SSH public key in terraform/hcloud.tf
with your own public key.
cd terraform
terraform init
terraform apply
- Change the path to your SSH private key in the inventory.
- The
kubeconfig
role stores your kubeconfig at~/.kube/config
by default. To change the path you can override thekubeconfig_local_path
variable (or change the yaml file).
cd ../ansible
pip install -r requirements.txt
ansible-galaxy install -r requirements.yml
ansible-playbook kubernetes.yml