This repository contains a fully automated solution for provisioning a secure, modular K3s cluster using Proxmox, Ansible, and Helm — complete with Jenkins and the Elastic Stack.
.
├── bootstrap.sh # Interactive provisioning script
├── kubeconfig # Pulled after K3s deployment
├── k3s-ansible/ # Ansible roles and playbooks for K3s
├── kubernetes/
│ ├── charts/ # Helm charts for ECK & Jenkins
│ ├── values/ # Helm values per environment
│ |── deploy/ # Kubernetes manifests (YAML)
| |__ network-policies/ # Network Policies
├── terraform/ # Proxmox VM provisioning
SSH keys are excluded from this structure for security reasons.
-
Ensure you have:
- A working Proxmox environment with:
- Valid API credentials
- An Ubuntu cloud-init image template pre-imported (e.g.,
ubuntu-24.04-ci-template)
- SSH key pair for VM access
- Local tools:
terraform,ansible,helm,kubectl,jq,yq,scp
- A working Proxmox environment with:
-
Run the bootstrap:
sh bootstrap.shThis script:
- Provisions master + worker nodes on Proxmox via Terraform
- Configures them into a K3s cluster using Ansible
- Pulls and rewrites the kubeconfig for access
- Installs:
- ECK (ElasticSearch, Kibana, Logstash)
- Jenkins via Helm
- All namespaces and network policies
- 🔁 Update your DNS:
- After deployment, point your DNS records (for Kibana, Jenkins, etc.) to the IP address of the worker node(s).
- These IPs are DHCP-assigned and can be found in the Terraform outputs or the Ansible inventory file.
terraform -chdir=terraform destroy
kubectl delete ns jenkins jenkins-cloud elastic-stackMIT — Feel free to use, modify, and contribute.