Getting Started: Homelab Cluster and GitOps Onboarding
This guide walks you through spinning up a Kubernetes homelab: provisioning VMs, bootstrapping the cluster, and deploying workloads using GitOps—all in under one hour.
For a minimal demo or test setup, see the quick‑start version.
Prerequisites
- Proxmox access (with SSH key set up on the hypervisor).
- Installed tools:
terraform.tfvars
file with your cluster's details (see below for example).- Access to this Git repository.
Overview of steps
- Configure cluster variables.
- Launch and provision VMs with Talos.
- Retrieve cluster access configs.
- Bootstrap and verify ArgoCD.
- Confirm GitOps deployment and cluster health.
Prepare the configuration
-
Clone the repository: Download the required files and move into the working directory.
git clone https://github.com/theepicsaxguy/homelab.git
cd homelab -
Configure cluster variables: Edit or create the
terraform.tfvars
file to define your cluster nodes:# terraform.tfvars
cluster_name = "homelab"
controlplane_ips = ["10.25.150.10", "10.25.150.11", "10.25.150.12"]
worker_ips = ["10.25.150.20", "10.25.150.21"]infoUse secure storage for secrets, like 1Password or Bitwarden, and avoid committing sensitive files. For more information, see the Argo CD Secrets Management .
Apply and deploy the cluster
-
Initialize SSH agent and OpenTofu: Enable SSH access and initialize the environment.
eval $(ssh-agent)
ssh-add ~/.ssh/id_rsa
tofu init -
Provision the VMs and Talos cluster: This step creates and configures all control-plane and worker nodes.
tofu apply
-
Retrieve Talos and Kubernetes configs: Fetch access configs and set secure permissions.
tofu output -raw talos_config > ~/.talos/config
tofu output -raw kube_config > ~/.kube/config
chmod 600 ~/.talos/config ~/.kube/config
Bootstrap and verify ArgoCD
-
Check or install ArgoCD: ArgoCD is usually installed automatically. To verify or re-apply manually:
kubectl get pods -n argocd
# If ArgoCD pods aren't running, install with:
kubectl apply -k k8s/infrastructure/controllers/argocd -
Monitor ApplicationSet synchronization: Use the ArgoCD CLI to confirm apps are recognized and syncing.
argocd app list
Verify the setup
-
Check node and service health:
talosctl health --talosconfig ~/.talos/config --nodes <control-plane-IP>
All checks should report
healthy
. -
Confirm apps are synced in ArgoCD UI: All applications should show Synced / Healthy status.
-
Inspect ArgoCD logs (optional troubleshooting):
kubectl logs -n argocd deployment/argocd-server
Look for messages indicating healthy reconciliation.
Pro tips and troubleshooting
-
To recreate a node (e.g., after resizing a disk):
tofu taint 'module.talos.proxmox_virtual_environment_vm.this["work-00"]'
tofu apply -
For common issues (API or etcd failures):
talosctl etcd members
-
Back up your
talosconfig
andkubeconfig
immediately after setup. -
Document and save your network layout for future troubleshooting.
For further details on cluster architecture, networking, and recovery, see Cluster Details.