Proxmox Virtual Environment (Proxmox VE) for running VMs and Kubernetes Cluster provisioned using Terraform and Ansible.
.
├── ansible # ansible playbook
├── kubernetes # kubernetes/ helm chart manifests
├── packer # packer vm templates
└── terraform # terraform iac
└── _talos # talos kubernetes cluster config
└── modules
└── kubernetes # kubernetes cluster essentials
└── kubernetes-addons # kubernetes addons
└── talos-k8s # talos kubernetes vm
└── talos-patch # talos kubernetes vm patch
└── vm # jumphost / router vm
└── vm-templates # vm templates
OPNsense router with zerotier plugin for VPC
Default Credentials
- username: root
- password: opnsense
Network Interface
Interface | Network | Description | IP |
---|---|---|---|
LAN | vtnet0 | Linux Bridge | 192.168.0.1/24 |
OPT | vtnet1 | VM Network | 172.16.0.0/16 |
OPT1 | zt0 | Zerotier Network | - |
- Update OPNsense to the latest version
System > Firmware > Updates
- Install
os-qemu-guest-agent
andos-zerotier
- Join Zerotier Network
VPN > Zerotier > Join Network
- Setup Network Interface or Import from previous backup
- Update
ansible/hosts
with jumphost vm
ubuntu-server ansible_host=x.x.x.x ansible_user=devops
- Run the
install-server.yaml
playbook with tags for each service to enable
- Harbor - Container registry
- Minio - S3 Compatible storage
- Vault - Secret management
- NFS server for Kubernetes Cluster
- Zerotier - Remote access to Jumphost
ansible-playbook install-server.yaml --list-tags
playbook: install-server.yaml
play #1 (ubuntu-server): Install Server TAGS: []
TASK TAGS: [always, harbor, minio, nfs, vault, zerotier]
- Provision Talos Kubernetes vm
terraform -chdir=./terraform plan
terraform -chdir=./terraform apply -target module.talos-k8s
-
Bootstrap Kubernetes Cluster, refer to talos directory for more details
-
Apply Kubernetes cluster essentials ( metrics-server / loadbalancer / nfs storage provisioner )
terraform -chdir=./terraform apply -target module.kubernetes
- Update the VM network LoadBalancer IP in
kubernetes/loadbalancer/metallb-address.yaml
kubectl apply -f ./kubernetes/loadbalancer
Install Keycloak OIDC and PostgreSQL
kubectl apply -f ./kubernetes/db/postgres.yaml
kubectl apply -f ./kubernetes/keycloak/keycloak.yaml
Keycloak client for application available in ./kubernetes/keycloak/client
Apply base kubernetes addons
terraform -chdir=./terraform apply -target module.kubernetes-addons
Install Mesh components and Patch Kong UI
kubectl apply -f ./kubernetes/monitoring/kiali.yaml
kubectl apply -f ./kubernetes/monitoring/jaeger.yaml
kubectl patch svc/kong-gateway-kong-manager --patch-file=./kubernetes/kong/kong-patch.yaml
Install Elastic and Kibana
kubectl apply -f ./kubernetes/elk/elastic.yaml
kubectl apply -f ./kubernetes/elk/kibana.yaml
Generated using rover