Kubernetes on Proxmox with Cloud-Init,Terraform and Ansible
This video shows how to use Terraform (with cloud-init), and Ansible to install Kubernetes on VMs running in Proxmox.
Ubuntu 24.04 is used as the base operating system on which infrastructure as code is used to configure Kubernetes.
Note: Please see the following for details of how to set up cloud-init with Terraform -
https://youtu.be/HbBblJOZs-c
In this video, we run through:
00:00 Intro and Environment Overview
01:18 Cloud-Init Pre-requisite
01:43 Resource Files
03:00 Generating the Public Key Pair
03:57 Terraform Init and adding the public key to the Terraform file
05:09 Terraform Apply Kubernetes Setup
05:33 Results of Terraform Deployment
06:21 Using Ansible to Setup Kubernetes nodes
08:44 Ansible Playbook run for Kubernetes Master
09:40 Kubernetes Join Node Process and join-nodes script
11:03 join-nodes.sh script
13:19 Results of join-nodes.sh script
13:50 Setting up an nginx test service
16:49 Outro
The Terraform and Ansible resource files, together with join-nodes.sh script and NodePort test, can be found here: https://github.com/HouseOfLogicGH/KubernetesOnProxmoxWithTerraformAndAnsible
Follow @HouseofLogicBlog or visit https://www.houseoflogic.co.uk for more tutorials and articles.