# K3s Cluster Setup with Terraform

This Terraform configuration sets up a k3s cluster on an existing virtual machine.

## Prerequisites

- Terraform installed on your local machine
- SSH access to the target machine
- SSH private key configured

## Usage

1. Initialize Terraform:
```bash
terraform init
```

2. Apply the configuration:
```bash
terraform apply
```

3. To destroy the cluster:
```bash
terraform destroy
```

## Configuration

The main configuration is in `main.tf`. It uses the SSH provider to:
1. Install k3s on the target machine
2. Retrieve the node token
3. Verify the node is running

## Important Notes

- Make sure your SSH private key has the correct permissions (600)
- The k3s token will be output after successful installation
- You can access the cluster using `kubectl` after copying the kubeconfig from the server
