If you want to run your own Kubernetes Cluster, you have plenty of possibilities: You can set up a single node cluster using minikube locally or on a remote machine. You can also set up a multi node cluster on VPS or using managed cloud providers such as AWS or GCE. Alternatively, you can use hardware, e.g. Raspberry Pis or bare metal servers. However, without the functionality provided by a managed cloud provider, it is difficult to take full advantage of the complete high availability capabilities of Kubernetes. We have tried – and present here the instructions for a highly available Kubernetes cluster on Hetzner bare metal servers.Read more “Kubernetes Cluster on Hetzner Bare Metal Servers”
When setting up Kubernetes clusters, it makes sense for the individual nodes of Kubernetes to live in the same private network. If Kubernetes is set up on bare metal machines from suppliers such as Hetzner, it may not necessarily be possible to set up a common network of this kind natively. This is where tinc comes in: it makes it very easy to set up a virtual network across all participating nodes. To keep the configuration of tinc parallel to that of Kubernetes (I use Kubespray for my Kubernetes setup), I developed an Ansible Role for tinc VPN and made it available on GitHub.
- Installing and setting up tinc VPN service
- In-place private key generation (private keys are never copied)
- Support for additional nodes where host machines are not covered by the playbook
- Support for custom routes for the VPN interface
- Support for joining existing bridge interfaces on the host machine
- Custom scripting for up/down hook scripts
For setup instructions or a tutorial how to use my Ansible Role for tinc VPN please check the README. It always contains the up-to-date instructions for using this role and will be updated, if new features come up.
In order to gain experience with a Kubernetes cluster or to be able to experiment with it, a functioning cluster is required. Since most conceptual challenges do not require a high performance test cluster, it is also sufficient to build a smaller and therefore more cost-effective one. For this reason I decided to set up a Raspberry Pi Kubernetes Cluster for testing purposes.
- 4x Raspberry Pi 3 Model B+
- 4x microSD Card (I’m using SanDisk Ultra 64GB)
- Power supply unit for the Raspberry Pi devices. You can also use any other 5V power source which provides enough current.
- 4 Micro USB cables for connecting the power suppy unit
- 4 Layer Acrylic Cluster Case
If the Raspberry Pis are not to be connected via WLAN but cable, the corresponding network components are also required:
- 5 Port Switch
- 4 short ethernet cables
The website of Hypriot has a very good tutorial how to set up a Kubernetes cluster with Raspberry Pi boards: https://blog.hypriot.com/post/setup-kubernetes-raspberry-pi-cluster/. If you need some configuration examples (executable on a Raspberry Pi Kubernetes Cluster) please check out my GitHub repository with configuration examples: https://github.com/MatthiasLohr/kubernetes-rpi-examples.