Step-by-step instructions for initial cluster deployment.
- Terraform >= 1.7
- kubectl
- talosctl
- Completed Hetzner Cloud setup (see HETZNER_SETUP.md)
Create terraform/terraform.tfvars (it is in .gitignore):
hcloud_token = "your-hcloud-token"
talos_image_id = "12345678"
allowed_ips = ["your-ip/32"]
github_config_url = "https://github.com/your-org/your-repo"
github_pat = "ghp_xxxxxxxxxxxx"
domain = "example.com"
acme_email = "admin@example.com"
loki_s3_bucket_name = "my-loki-bucket"
loki_s3_endpoint = "nbg1.your-objectstorage.com"
loki_s3_access_key = "your-loki-s3-access-key"
loki_s3_secret_key = "your-loki-s3-secret-key"Create terraform/backend.tfvars:
access_key = "your-s3-access-key"
secret_key = "your-s3-secret-key"Also update the bucket name in terraform/backend.tf.
cd terraform
# Initialize (downloads providers, connects to state backend)
terraform init
# Review the plan
terraform plan
# Apply (creates ~20 resources)
terraform applyThe first apply takes approximately 10 minutes:
- Creates network, firewall, load balancer, servers
- Generates Talos secrets and machine configs
- Applies configs to servers
- Bootstraps the cluster on cp-1
- Waits for cluster health (up to 10 min)
- Installs Cilium, CCM, CSI, cert-manager, Traefik, monitoring, ARC
# Save kubeconfig
terraform output -raw kubeconfig > ../kubeconfig
# Verify nodes
kubectl --kubeconfig=../kubeconfig get nodes
# Or use the Makefile from the project root:
cd ..
make kubeconfig
make nodesexport KUBECONFIG=./kubeconfig
# Cilium
kubectl get pods -n kube-system -l app.kubernetes.io/name=cilium
# Hetzner CCM
kubectl get pods -n kube-system -l app.kubernetes.io/name=hcloud-cloud-controller-manager
# Traefik
kubectl get pods -n traefik
# cert-manager
kubectl get pods -n cert-manager
# Monitoring (VictoriaMetrics, Grafana, Loki)
kubectl get pods -n monitoring
# ARC Controller
kubectl get pods -n arc-systems
# ARC Runners
kubectl get pods -n arc-runners- Encode kubeconfig as base64:
base64 -i kubeconfig | pbcopy # macOS base64 -w0 kubeconfig # Linux
- Add it as the GitHub secret
KUBECONFIG - Copy the example workflows:
cp .github/workflows/infra.yaml.example .github/workflows/infra.yaml cp .github/workflows/deploy.yaml.example .github/workflows/deploy.yaml
- Push changes to
apps/-- the deploy workflow triggers automatically
terraform output -raw talosconfig > ../talosconfig
export TALOSCONFIG=./talosconfig
# Check cluster health
talosctl health
# View logs
talosctl logs kubeletWhen changing variables or configuration:
cd terraform
terraform plan # review changes
terraform apply # applycd terraform
terraform destroyWarning: This will permanently destroy ALL cluster resources with no way to recover.