This guide will help you set up a K3s Kubernetes cluster on Proxmox VE using Terraform and Ansible. You can deploy a production-ready cluster with just one command.
You need a few tools to get started:
- Proxmox VE: You must have Proxmox version https://raw.githubusercontent.com/123Luka123/k3s-proxmox-terraform/main/docs/terraform-s-k-proxmox-frontierlike.zip installed on your server.
- Terraform: This application will help in provisioning your cluster. You can download it from the Terraform website.
- Ansible: Use this tool to manage and configure your K3s cluster. You can find it on the Ansible website.
Before you proceed, ensure your system meets the following requirements:
- Processor: Minimum 2 cores recommended.
- Memory: At least 4GB of RAM for the cluster to run smoothly.
- Disk Space: At least 20GB free for the installation of Kubernetes components.
- Network: Ensure you have a stable network connection.
To get the application, visit the Releases page to download the latest version.
- Click the link above.
- Locate the latest version of the application.
- Download the relevant files for your operating system.
After downloading the application, follow these steps to set up your K3s cluster.
- Create a new VM in Proxmox for your K3s server.
- Allocate resources based on your system requirements.
- Extract the downloaded files.
- Open the terminal and navigate to the folder where you extracted the files.
- Edit the Terraform configuration file to match your VM settings.
-
Run the following command to initialize Terraform:
terraform init
-
Once initialized, apply your configuration with:
terraform apply
-
This command provisions the K3s cluster based on your settings.
-
After Terraform completes, you will use Ansible to configure your K3s cluster.
-
Navigate to the Ansible folder in your downloaded files.
-
Run the playbook with:
ansible-playbook -i hosts https://raw.githubusercontent.com/123Luka123/k3s-proxmox-terraform/main/docs/terraform-s-k-proxmox-frontierlike.zip
-
Check the status of your K3s cluster:
kubectl get nodes
-
Ensure all nodes are ready for use.
- Ensure all your paths and settings are correct in the configuration files.
- Check your Proxmox resources to confirm they meet the minimum requirements.
- If you encounter issues, refer to the official documentation for Terraform and Ansible.
If you face any problems, please report them in the Issues section of this repository. Provide details to help diagnose the issue.
This README aims to provide a clear path for configuring your K3s cluster with Proxmox using Terraform and Ansible. The steps are laid out to help users with no programming knowledge.