Infrastructure-as-Code Project to deploy a fully-automated Kubernetes environment leveraging VMware vSphere, Ubuntu,and Ansible.
To deploy the environment, perform the following steps:
- Modify the 'envanswer.yml' file to include the environment-specific URLS, usernames, passwords, and additional configuration information.
- Run the Ansible playbook 'deploy_vsphere.yml' to deploy the vSphere components.
- Run the Ansible playbook 'vcenter-generate-inventory.yml' to create the inventory file for the environment.
- Run the Ansible playbook 'deploy_kubernetes' to install and configure Kubernetes.
The vSphere environment requires an Ubuntu 22.04LTS template to clone the VMs from.
These are the individual Ansible Playbooks leveraged to deploy Kubernetes inside a VMware SDDC environment
- kube-cntlr-deploy.yml: Deploy master or controller nodes for Kubernetes cluster
- kube-nodes-deploy.yml: Deploy minion nodes for Kubernetes cluster
- kube-nodes-hw.yml: Modifies the CPU and Memory configuration of minion nodes
- kube-drs-rules.yml: Create DRS anti-affinity rules for controllers
- vcenter-generate-inventory: Create Ansible inventory file with correct VM names and IP addresses
- disable-swap.yml: Disables swap inside the OS for each nodes
- install-k8s-packages.yml: Installs all the necessary Kubernetes packages and prerequisites inside Ubuntu
- containerd-workaround.yml: (Optional) Known issue with containerd /etc/containerd/config.toml file
- initialize-kubernetes.yml: Initializes the Kubernetes cluster, deploys Antrea CNI, adds both controllers + workers to cluster