From 51c7e6080b20ad539507e4165c84e4c967f646ec Mon Sep 17 00:00:00 2001 From: trivernis Date: Mon, 9 Oct 2023 00:35:01 +0200 Subject: [PATCH] Add instructions for how to install and use the configs --- README.md | 13 ++++++++++++- cluster/SETUP.md | 29 +++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 cluster/SETUP.md diff --git a/README.md b/README.md index 8a9c632..1f187a3 100644 --- a/README.md +++ b/README.md @@ -1 +1,12 @@ -# My flux cd cluster setup \ No newline at end of file +# My flux cd cluster setup + +## Initial cluster setup + +Follow the steps outlined in [SETUP.md](./cluster/SETUP.md). + +## Repo structure + +After deploying [flux](https://fluxcd.io) on the cluster and pointing +it to this repo it should be able to create all the apps defined in the +[apps folder](./apps). For the sealed secrets the private key has to be deployed +on the cluster. Otherwise those secrets need to be recreated. diff --git a/cluster/SETUP.md b/cluster/SETUP.md new file mode 100644 index 0000000..75c3ff6 --- /dev/null +++ b/cluster/SETUP.md @@ -0,0 +1,29 @@ +# Additional manual steps + +## Cluster Setup + +```bash +# new first server node +curl -sfL https://get.k3s.io | K3S_TOKEN= sh -s - server \ + --cluster-init \ + --cluster-cidr="10.243.0.0/16" \ + --flannel-backend=wireguard-native \ + --write-kubeconfig-mode=644 \ + --disable local-storage \ + --node-name="$(hostname -f)" \ + --kube-controller-manager-arg="bind-address=0.0.0.0" \ + --kube-proxy-arg="metrics-bind-address=0.0.0.0" \ + --kube-scheduler-arg="bind-address=0.0.0.0" + +# second server node +curl -sfL https://get.k3s.io | K3S_TOKEN= sh -s - server \ + --server https://:6443 \ + --cluster-cidr="10.243.0.0/16" \ + --flannel-backend=wireguard-native \ + --write-kubeconfig-mode=644 \ + --disable local-storage \ + --node-name="$(hostname -f)" \ + --kube-controller-manager-arg="bind-address=0.0.0.0" \ + --kube-proxy-arg="metrics-bind-address=0.0.0.0" \ + --kube-scheduler-arg="bind-address=0.0.0.0" +```