Warning
This repo is not finished yet, but feel free to create PRs, issues!
This is only a Pet Project, where I make some notes about how did I set up my Raspberry at home.
wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
sudo apt update && sudo apt install terraform
- Create a variables.auto.tfvars file with a similar content:
system_host="xx.xx.xx.xx"
system_user="xxx"
system_password="xxx"
LOG=debug
Or you can set the variables according to the docs, via Environment variables, or via a specific tfvars file for example: terraform plan -var-file=”my_variables.tfvars”
2. Run from the repository's root folder:
terraform init
terraform plan
terraform apply
- Find the
kubeconfig.yaml
in thekubernetes
module
- https://registry.terraform.io/providers/neuspaces/system/0.4.0
- https://registry.terraform.io/providers/TelkomIndonesia/linux/0.7.0
- https://registry.terraform.io/providers/hashicorp/tls/4.0.5
- Before k3s install, the cgroup memory should be updated, so no manual step, neither restart is required. Example command:
echo " cgroup_memory=1 cgroup_enable=memory" | tee -a filename >/boot/cmdline.txt
- There are many hacky, shell-based resources + without delete lifecycle implementation.
-
kubernetes_services
module is not tried out, yet; but you can try to apply them viakubectl
. - Add and use service accounts
- Add Traefik and some general Observability tools -> https://doc.traefik.io/traefik/observability/metrics/overview/
- Add https with custom cert -> https://cert-manager.io/docs/releases/