Automated Kubernetes Deployment with Ansible

Virtual Elephant now has a YouTube channel!

With everyone locked away (to varying degrees) during this COVID-19 pandemic, I have been able to leverage some time each day to study for the Certified Kubernetes Administrator exam and playing with Kubernetes in the lab. As part of these efforts, I have graduated from building out my Kubernetes clusters manually to writing Ansible automation for the deployments.

As a result, the GitHub repository vsphere-kubernetes has been completely re-vamped and now enables a user to deploy a complete Kubernetes cluster, based on either Cilium or Flannel, in an automated fashion through Ansible.

The vsphere-kubernetes project is broken into two phases:

  • Deployment and configuration of the VMs inside vCenter
  • Installation and configuration of Kubernetes

As part of launching the new version of the project, I recorded a couple videos walking through the use of the Ansible playbooks and these are being used to launch the new YouTube channel.

I divided the videos into parts, just like the repository, so the first video covers the deployment of the VMs that will be used to create the Kubernetes cluster.

The second video covers the installation of Docker and Kubernetes across the nodes. In addition it performs the cluster initialization, inclusion of Cilium (or Flannel) for the CNI, and joining all of the minion nodes to the primary controller.

I am really excited to have these playbooks written and operational. I’ve been significantly leveraging them the past few weeks within my homelab, and they have made a world of difference for testing and trying out new Kubernetes projects.

The next phase in the project will be the use of NSX-T as the CNI plugin for a Kubernetes cluster before I begin embarking on the Tanzu projects by VMware.

Enjoy!

Scroll Up