Quite often I prefer to read about a product and then do the installation. In the case of Kubernetes though, although it is a product I have been aware off for some time it is new for me hands on wise. I wanted to try a different approach. There are a couple of ways you can go about a lab environment on your own. You can run it on Linux, Windows or MacOS. I have seen a few people running it on ARM too. The Kubernetes Up and Running book has an example in the appendix on how to build a Raspberry K8s cluster. It all depends on your choice of poison.
If you are a developer or want to play around with Kubernetes then Minicube could be a good option. It is a single host solution that combines all the requirements of a Kubernetes setup into one host.
The other way which is more like installing a cluster for enterprise levels is with for example Kubeadm. This is where you will have a minimum of two nodes:
-
- A Management node
- At least one worker node.
In my case I want to do most of my testing on an actual cluster so I will also cover a Kubeadm deployment, in a separate post.
You could also choose to go with a cloud based solution, The three big providers (GCP, Azure AKS and AWS) all have services to cover them. Personally I’m not a big fan of public cloud and I am more interested in the background workings of Kubernetes.
Container Runtime or CRI
Both choices requires a container run-time interface (CRI). In most cases I come across this tends to be Docker. One of the reasons for this is that docker images have become the standard type of images used in many cases. Some of the other CRIs out there are cri-o and containerd.
Kubeadm platform
I decided to create a 3 node cluster (1 management node and 2 pod nodes). Each node would have 2 CPUs and 8 GB of RAM plus a minimal installation of Debian. For the time being it’s running in a VMware Fusion setup.
Additional nodes
Additionally to the 3 node Kubernetes cluster I also configured DNS via Bind (you can see how that is done here). I also decided to setup a Ansible node for future ideas. There are a few Ansible modules for Kubernetes and it will allow me to perform other things related to managing Debian.