Added documentation

This commit is contained in:
Max Pfeiffer
2024-11-09 15:16:46 +01:00
parent ec311d6e52
commit 67ab2ce633
2 changed files with 52 additions and 1 deletions

View File

@@ -1 +1,45 @@
# proxmox-talos-opentofu
# proxmox-talos-opentofu
Proof of concept project using [OpenTofu](https://opentofu.org/) to install a Kubernetes cluster on a Proxmox
hypervisor using [Talos Linux](https://www.talos.dev/).
## Requirements
You need to have installed on your local machine:
* [OpenTofu](https://opentofu.org/)
* [kubectl](https://kubernetes.io/docs/reference/kubectl/) (for testing and cluster interaction)
## Provisioning
The project is grouped in two modules:
* proxmox: provisioning of virtual machines, operating systems and Kubernetes cluster
* kubernetes: provisioning of Kubernetes cluster resources
So you want first to provision the Proxmox part: create a `credentials.auto.tfvars` file based on the example.
```shell
cd proxmox
tofu init
tofu plan
tofu apply
```
You can then grab the kube config file for Kubernetes provisioning like so:
```shell
tofu output kubeconfig
```
and put its contents into your `~/.kube/config`.
Test if your cluster access works by listing the nodes:
```shell
kubectl get nodes
```
Secondly, you can provision the Resources inside the Kubernetes cluster:
```shell
cd kubernetes
tofu init
tofu plan
tofu apply
```
## Information Sources
* Terraform providers/modules
* [terraform-provider-proxmox](https://github.com/Telmate/terraform-provider-proxmox)
* [terraform-provider-talos](https://github.com/siderolabs/terraform-provider-talos)

View File

@@ -0,0 +1,7 @@
proxmox_api_url = "https://192.168.1.10:8006/api2/json"
proxmox_api_token_id = "root@pam!supersecret"
proxmox_api_token_secret = "js7ej5k9-hd75-hd64-js56-js834jmd732"
proxmox_target_node = "your proxmox node"
cluster_name = "your cluster name"
cluster_endpoint = "https://192.168.1.100:6443"