Experiment to create a k3s cluster with a master and multiple workers. Each node is an LLM and they communicate with eachother using gRPC. Use Terraform to provision servers and Ansible for setting up dependencies across machines. K3S then used to set up cluster.
*Verifying Operations:
ssh root@$(terraform output -raw master_ip)
kubectl get nodes
kubectl get pods -A
kubectl create deployment nginx-test --image=nginx:alpine
kubectl get pods -o wide
Destroying terraform-provisioned services:
terraform destroy
rm -rf k3s-token inventory.ini k3s.yaml
terraform commands
terraform init
terraform plan -out=cluster.plan
terraform apply "cluster.plan"
terraform output ansible-inventory -i inventory.ini --list
ansible-playbook -i inventory.ini k3s-setup.yml -vvv
terraform destroy -auto-approve rm -rf cluster.plan