A learning by doing ansible repository to manage my personal kubernetes cluster on hetzner cloud.
- Install
hetzner.hcloud
extension and thehcloud
library
ansible-galaxy collection install hetzner.hcloud
sudo pip3 install hcloud
- Create a new porject on hetzner cloud and generate an API key
- Set the
HCLOUD_TOKEN
environment variable to your API key
- kubernetes-config.yaml: Configure the vm location and type, kubernetes version etc. of your cluster.
- provision-master.yaml: Create a master node and initialize a new cluster. In case the cluster is already set up, this script can be used to reset the cluster configuration.
- add-worker.yaml: Create a new worker and attachs it to the existing master.
- drain-worker.yaml: Remove a worker.