logo

Creation of Kubernetes Cluster: Personal Experience

Deploy Kubernetes Cluster to vSphere using: terraform + Ansible

More than one way to skin a cat.

The old adage which basically means there are multiple ways to achieve a goal. This is no different in IT and for creating Kubernetes clusters – there have been multiple ways in standing up a fully functioning cluster.

Here are some of the I’ve tried and my experience of doing it:

If you want an opinionated way of doing it, go PKS (https://docs.vmware.com/en/VMware-Enterprise-PKS/index.html) or Rancher (https://rancher.com/)

I felt it abstracts too much underlying components which is: good if your focusing in just getting Kubernetes cluster up and running. Bad: if you want to learn the underlying components. What it ended up is – if you encounter issues with the cluster (eg. unable to mount persistent storage/ pvc), since the underlying infra was “abstracted” you don’t know how to troubleshoot

You’ll end up doing “oh.. can’t mount persistent. let me try to login to the nodes hmm i can’t login to the nodes because i didn’t know how it was setup. :(”

If you want flexibility in building it, go ansible based install. I recommend Kubespray (https://github.com/kubernetes-sigs/kubespray)

It goes thru the details and customization of what you want to put in the Cluster. This is good if you want to build it up by picking the “components” you want to utilize. Bad if your just starting with the technology as you need time to know what to choose (eg. should i choose flannel over calico? which ingress controller should i use?)

If you want officially supported install from the Kubernetes upstream, use kubeadm.

With kubeadm – it focuses in bring up kubernetes cluster and the pod networking. Basically, bare-minimum in having kubernetes cluster. After doing it, you need to customize it depending on your usecase. Install ingress controller + ingress monitoring. etc.

Having said all of this — I’ve come up with a ghetto solution to get the Kubernetes Cluster i wanted by combining the good in (3) with a touch of (1) and (2) which I’ll detail in the next post.

Hope this helps.

Leave a Reply

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.