mirror of
https://github.com/auricom/home-cluster.git
synced 2025-12-22 07:26:30 +01:00
| datasource | package | from | to | | --------------- | ------------ | ------- | ------- | | github-releases | fluxcd/flux2 | v0.36.0 | v0.37.0 | | github-releases | fluxcd/flux2 | v0.36.0 | v0.37.0 | | github-tags | fluxcd/flux2 | v0.36.0 | v0.37.0 |
:book: Overview
This directory contains my Talos Kubernetes cluster in declarative state.
I use my own tool Talhelper to create the machineconfig files of all my nodes.
The secrets are encrypted with SOPS.
Feel free to open a Github issue if you have any questions.
:scroll: How to apply
- Prepare your nodes with
Talos Linux - Install
talhelper. - Create your own talconfig.yaml.
- Run
talhelper gensecret > talsecret.sops.yamlif you don't havemachineconfigbefore ortalhelper gensecret -f <your-machineconfig.yaml> > talsecret.sops.yamlif you already have one. - Run
sops -e -i talsecret.sops.yamlto encrypt your secrets (make sure you already have your own.sops.yaml) file. - Run
talhelper genconfigand the files will be generated in./clusterconfigdirectory by default. - Copy the generated
./clusterconfig/talosconfigto your~/.talos/config. - Run
talosctl -n <node-ip> apply-config --insecure --file ./clusterconfig/<clustername>-<hostname>.yamlon each of your node. Don't forget to runtalosctl -n <node-ip> bootstrapon one of your controlplane node. - Push your current directory to your git repository of choice. 😉
:memo: After bootstrap
- Deploy cilium :
kubectl kustomize --enable-helm ./cni | kubectl apply -f - - Deploy kubelet-csr-approver
kubectl kustomize --enable-helm ./kubelet-csr-approver | kubectl apply -f -to approve csr issued by talos nodes (that will allow to see pods logs). - Deploy flux
kubectl apply -k ./flux - Create flux github secret
kubectl apply -f ./flux/.decrypted\~github-deploy-key.sops.yaml - Create sops secret
cat ~/.config/sops/age/keys.txt | kubectl create secret generic sops-age --namespace=flux-system --from-file=age.agekey=/dev/stdin - Apply flux cluster configuration
kubectl apply -k kubernetes/flux - Apply flux base configuration
kubectl apply -f kubernetes/base/flux.yaml - Apply flux core
kubectl apply -f kubernetes/cluster-0/core/flux.yaml - Apply flux apps
kubectl apply -f kubernetes/cluster-0/apps/flux.yaml