2022-07-03 16:19:22 -05:00
|
|
|
# Home Cluster
|
|
|
|
|
|
|
|
## TODO
|
|
|
|
|
2022-07-05 14:20:27 -05:00
|
|
|
- **Netboot**: https://www.sidero.dev/v0.5/getting-started/prereq-dhcp/
|
|
|
|
- Can probably leverage `dnsmasq` on the router for this?
|
2022-07-03 16:19:22 -05:00
|
|
|
|
|
|
|
## Setup
|
|
|
|
|
2022-07-05 14:20:27 -05:00
|
|
|
### Networking
|
2022-07-03 16:19:22 -05:00
|
|
|
|
|
|
|
- Prepare networking
|
|
|
|
- Internally:
|
|
|
|
- Add a DNS entry for the cluster endpoint (router's `/etc/hosts` + `dnsmasq`) to point to the initial node
|
|
|
|
- Externally:
|
|
|
|
- Add a DNS entry for the cluster endpoint to point to the router
|
|
|
|
- Setup the router to forward external requests to the initial node
|
2022-07-05 14:20:27 -05:00
|
|
|
|
|
|
|
### Setup Kubernetes Cluster
|
|
|
|
|
|
|
|
> **Source**: https://www.talos.dev/v1.1/introduction/getting-started/
|
|
|
|
|
|
|
|
- Boot the Talos image on the initial node
|
2022-07-03 16:19:22 -05:00
|
|
|
- If you are not using _this_ configuration:
|
|
|
|
- `talosctl gen config "cluster-name" "cluster-endpoint"`
|
|
|
|
- Edit files as needed
|
|
|
|
- Apply the control plane config to the initial node
|
|
|
|
- `talosctl apply-config --insecure --nodes "$INITIAL_NODE_ADDR" --file controlplane.yaml`
|
|
|
|
- You will need to wait a bit for the configuration to be applied, Talos to
|
|
|
|
install itself, for the node to reboot, and for post-boot initialization
|
|
|
|
- Setup the client to communicate with the newly-configured node
|
|
|
|
- `talosctl --talosconfig=./talosconfig config endpoint "$INITIAL_NODE_ADDR"`
|
|
|
|
- Optionally also make this the default with `talosctl config merge ./talosconfig`
|
|
|
|
- Bootstrap the cluster
|
|
|
|
- `talosctl bootstrap --nodes "$INITIAL_NODE_ADDR"`
|
|
|
|
- You will need to wait a bit for Kubernetes to initialize
|
|
|
|
- Pull down the kubeconfig
|
|
|
|
- `talosctl kubeconfig`
|
|
|
|
|
|
|
|
Once the cluster has finished initializing _and starting up_, you should be
|
|
|
|
able to `kubectl get nodes`.
|
|
|
|
|
2022-07-05 14:20:27 -05:00
|
|
|
#### Adding Nodes
|
|
|
|
|
|
|
|
> **Note**: UNTESTED
|
2022-07-03 16:19:22 -05:00
|
|
|
|
|
|
|
- Boot the Talos ISO on the target node
|
|
|
|
- Apply the appropriate configuration to the target node
|
|
|
|
- `talosctl apply-config --insecure --nodes "$TARGET_NODE_ADDR" --file controlplane.yaml`
|
|
|
|
- You will need to wait a bit for Kubernetes to initialize, start up, and
|
|
|
|
then join the cluster
|
2022-07-03 20:22:09 -05:00
|
|
|
- Add the node to `talosconfig` as needed
|
2022-07-03 16:19:22 -05:00
|
|
|
|
2022-07-05 14:20:27 -05:00
|
|
|
#### Untaint Masters
|
|
|
|
|
|
|
|
Since we're "frugal" (cheap) and we want to use all the hardware for all the
|
|
|
|
things:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
kubectl taint nodes --all node-role.kubernetes.io/master-
|
|
|
|
```
|
|
|
|
|
|
|
|
### Apply Initialization Manifests
|
|
|
|
|
|
|
|
```bash
|
|
|
|
kubectl apply -k manifests/initialization
|
|
|
|
```
|
|
|
|
|
|
|
|
### Setting up GitOps
|
|
|
|
|
|
|
|
**TODO**
|
|
|
|
|
|
|
|
### Storage
|
2022-07-03 16:19:22 -05:00
|
|
|
|
2022-07-05 14:20:27 -05:00
|
|
|
**TODO**
|
2022-07-03 16:19:22 -05:00
|
|
|
|
|
|
|
## Load Balancing
|
|
|
|
|
|
|
|
I can _probably_ handle this with my router?
|
|
|
|
|
2022-07-05 14:20:27 -05:00
|
|
|
**TODO**
|