Install Kubernetes on VMware Vsphere
In this post we explain how to automate the installation of Kubernetes on VMware Vsphere using ClusterAPI, among other tools. Besides, as part of the process we will also:
- Generate a virtual machine to be used as a bastion host, with all the necessary tools to interact with the cluster.
- Leverage Gitops to simplify the management of the Kubernetes cluster and of the applications deployed on it.
Step 1: Generate the VMs images
To make it possible to work with ClusterAPI we need to generate images of the virtual machines we will be using, with the specific version of Kubernetes we wish to install. That way, creating and updating the clusters gets really easy.
Step 2: Create a bastion host to interact with the cluster
Although this is not a mandatory step, having a bastion host guarantees that we always have in place the necessary tools to work with the cluster.
In the following video, we show how to create a bastion host in VMware VSphere using Terraform and Ansible, from a template created with Packer.
Step 3: Create the Kubernetes cluster
With the two previous steps completed, we can now move to the core of this tutorial, which is the deployment of the Kubernetes cluster.
In the previous video a reference is made to a Clsuter API HELM chart repository, which can be found at: https://github.com/Mikroways/cluster-api-helm
Step 4: Add Gitops to manage the cluster
The last step consists on using the best of Gitops to manage the Kubernetes cluster. In this case, we show how to easily create a cluster with ArgoCD, using our Cluster API HELM chart.