Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ujstor/k3s-single-node-iac
Minimal k3s single node deployment on Hetzner Cloud with Terraform and Ansible.
https://github.com/ujstor/k3s-single-node-iac
Last synced: about 1 month ago
JSON representation
Minimal k3s single node deployment on Hetzner Cloud with Terraform and Ansible.
- Host: GitHub
- URL: https://github.com/ujstor/k3s-single-node-iac
- Owner: Ujstor
- License: mit
- Created: 2024-11-03T20:47:28.000Z (about 2 months ago)
- Default Branch: master
- Last Pushed: 2024-11-19T00:22:30.000Z (about 1 month ago)
- Last Synced: 2024-11-19T01:27:38.841Z (about 1 month ago)
- Language: HCL
- Homepage:
- Size: 3.72 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# K3S Single Node IaC
Minimal k3s single node deployment on Hetzner Cloud with Terraform and Ansible.
## Terraform
```bash
cd hetzner_infraterraform init
terraform apply
```## Ansible
```bash
docker build -t ansible-k3s ./ansibledocker run --rm -it \
-v $(pwd)/inventory.yml:/config/inventory.yml \
-v $(pwd)/hetzner_infra/.ssh/k3s_hetzner_key:/secrets/ssh_key \
-v $(pwd)/hetzner_infra/.ssh/k3s_hetzner_key.pub:/secrets/ssh_key.pub \
ansible-k3sansible-playbook playbook_k3s_deploy.yml
cat kubeconfig
```or use the [prebuilt](https://hub.docker.com/repository/docker/ujstor/ansible-k3s-deploy/general) image.
## Helm
### Install Cilium in the `kube-system` namespace:
```bash
cd helm/system/cilium
helm install cilium . -n kube-system
```### Install Argo CD:
```bash
kubectl create namespace gitops
cd helm/system/argo-cd
helm install argocd . -n gitops
```### Apply `aoa.yaml` in the `gitops` namespace:
```bash
cd helm
kubectl apply -f aoa.yaml -n gitops
``````The cluster will be automatically bootstrapped.