Skip to content

Latest commit

Β 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

☁️ K3s-on-Proxmox Stack

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.


πŸ“¦ Project Structure

.
β”œβ”€β”€ 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.


πŸš€ How to Build the Project

  1. 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
  2. Run the bootstrap:

sh bootstrap.sh

This 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
  1. πŸ” 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.

🧼 Cleanup

terraform -chdir=terraform destroy
kubectl delete ns jenkins jenkins-cloud elastic-stack

πŸͺͺ Licensing

MIT β€” Feel free to use, modify, and contribute.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages