- You have a Proxmox Server/Cluster capable of running 4+ Linux VM's
- You have an Internet Connection
- You're comfortable with the CLI in Linux
- Understand containerization concepts
- Watch lots of home lab YouTube content :)
- Create Proxmox User w/ API Token
- Create VM template via 'build_cloud_image_vm_template.sh' (must be done on proxmox host)
- edit script to fit your proxmox environment
- VMID
- TMPL_NAME
- TMPL_DESCRIPTION
- PVE_DISK
- DISK_SZ
- PVE_NODE
- assign ssh public key in build script for cloud init drive
- Currently designed to create Ubuntu 23.04 Cloud Image VM/Template
- edit script to fit your proxmox environment
ssh root@pve-6
apt update -y && apt install libguestfs-tools -y
cd k3s_deployment/modules/pm_vm_template
- Add SSH public keys to the id_sshkeys.pub file as this file is used to seed the cloud image drive.
- Change variables in build_cloud_image_vm_template.sh to ensure you're pointing to the right PVE SERVER, PVE DISK, etc.
bash ./build_vm_template.sh
VIRTUAL MACHINE TEMPLATE: [9900 - ubun2204-k3s-tmpl-01]
- Provision 5 - 6 VM's from VM template using Terraform
- 3 Server Nodes and 2 - 3 Worker Nodes
- Server Nodes: 2 CPU / 4 GB RAM (2 GB min)
- Worker Nodes: 2 CPU / 8 GB RAM
- edit terraform.tfvars and main.tf as required
- assign static ip scheme to support K3S deployment
- 3 Server Nodes and 2 - 3 Worker Nodes
terraform init
terraform apply -auto-approve
K3S SRVR::VIRTUAL MACHINES: [7701/2/3 - k3s-srvr-nodes-(1-3)] FROM THE TEMPLATE ON PVE-6: [9900 - ubun2204-k3s-tmpl-01]
K3S WRKR::VIRTUAL MACHINES: [7201/2/3 - k3s-wrkr-nodes-(1-3)] FROM THE TEMPLATE ON PVE-5: [9200 - ubun2204-k3s-tmpl-02]
- Execute K3S deployment script
./k3s.sh
- Jim's Garage TY Channel: https://www.youtube.com/watch?v=6k8BABDXeZI
- Go to: http://LOADBALANCER_IP and the Nginx page should appear
ENJOY and begin to containerize all the things!
Major Shout Out to all of the YouTube Home Lab content creators that helped me create this solution!
helm repo add rancher-alpha https://releases.rancher.com/server-charts/alpha
kubectl create namespace cattle-system
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.11.0/cert-manager.crds.yaml
helm repo add jetstack https://charts.jetstack.io
helm repo update
helm install cert-manager jetstack/cert-manager \
--namespace cert-manager \
--create-namespace --version v1.11.0
kubectl get pods --namespace cert-manager
helm install rancher rancher-alpha/rancher --devel \
--namespace cattle-system \
--set hostname=rancher.cloudhunters.io \
--set bootstrapPassword=admin
kubectl -n cattle-system rollout status deploy/rancher
kubectl -n cattle-system get deploy rancher
kubectl expose deployment rancher --name rancher-lb --port=443 --type=LoadBalancer -n cattle-system service/rancher-lb exposed
- Rancher - K3S GUI Management Console