- kubectl
- age
- SOPS
- KSOPS (Kustomize SOPS plugin)
- Helm
- helm-diff (Helm plugin, needed by Helmfile)
- Helmfile
cd terraform
# Decrypt config files
sops decrypt kubeconfig.sops.yaml >kubeconfig.yaml
sops decrypt talosconfig.sops.yaml >talosconfig.yaml
export TF_VAR_hcloud_token="<your token>"
# Initialize modules and stuff
terraform init
# Preview the changes
terraform plan
# Apply
terraform applyIf Terraform makes changes to the kubeconfig.yaml or talosconfig.yaml files, remember to re-encrypt them into kubeconfig.sops.yaml and talosconfig.sops.yaml respectively.
cd kubernetes
export KUBECONFIG="$(readlink -f ../terraform)/kubeconfig.yaml"
export SOPS_AGE_KEY_FILE=/path/to/sops/age/k8s.agekey
# This is very common in the Kubernetes world :)
alias k='kubectl'
# You may also want to set a convenience alias for `kustomize build`,
# as these flags are needed by KSOPS.
alias kbuild='kustomize build --enable-alpha-plugins --enable-exec'
# The commands below assume you've set the aliases above.
kbuild bootstrap | k apply -f -
helmfile apply -f helm/helmfile.yaml
kbuild gateway | k apply -f -
kbuild argocd | k apply -f -
kbuild whoami | k apply -f -