Added documentation
This commit is contained in:
44
README.md
44
README.md
@@ -1 +1,45 @@
|
||||
# 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)
|
||||
|
||||
7
proxmox/credentials.auto.tfvars.example
Normal file
7
proxmox/credentials.auto.tfvars.example
Normal 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"
|
||||
Reference in New Issue
Block a user