73 lines
2.3 KiB
Markdown
73 lines
2.3 KiB
Markdown
# HomeK8s
|
|
|
|
Home Kubernetes cluster (kubeadm), same GitOps layout as `lab/`.
|
|
|
|
Flux CD will take over once Forgejo is back. Until then apply with kustomize:
|
|
|
|
```bash
|
|
kubectl apply -k infrastructure/home
|
|
```
|
|
|
|
## Cluster
|
|
|
|
| Node | WG IP | Roles | Notes |
|
|
|-------------|------------|--------------------------|--------------------------------------------|
|
|
| siriussec | 10.10.0.2 | control-plane, worker | default scheduling |
|
|
| rpi | 10.10.0.1 | traffic, worker | `dedicated=network:PreferNoSchedule` |
|
|
|
|
- CNI: Cilium 1.18.13, kube-proxy replacement, Gateway API hostNetwork on `dedicated=network`
|
|
- Overlay: WireGuard `10.10.0.0/24` (API only on WG)
|
|
- Ingress: Cloudflare tunnel → `127.0.0.1:8080` on rpi → Gateway `gateway-system/public`
|
|
- Storage: local-path on siriussec (`/opt/local-path-provisioner`)
|
|
|
|
Pin traffic / light workloads to the Pi:
|
|
|
|
```yaml
|
|
nodeSelector:
|
|
dedicated: network
|
|
```
|
|
|
|
## Layout
|
|
|
|
```
|
|
homek8s/
|
|
├── apps/
|
|
│ ├── base/ # app definitions
|
|
│ └── home/ # overlay applied to this cluster
|
|
├── clusters/
|
|
│ └── home/ # Flux Kustomizations (bootstrap later)
|
|
│ ├── flux-system/ # flux bootstrap (after Forgejo)
|
|
│ ├── apps.yaml
|
|
│ ├── infrastructure.yaml
|
|
│ └── monitoring.yaml
|
|
├── infrastructure/
|
|
│ ├── home/ # kubectl apply -k target (no HelmRelease)
|
|
│ ├── networking/
|
|
│ │ ├── cilium/ # HelmRelease for Flux
|
|
│ │ └── gateway/ # Cilium Gateway API
|
|
│ ├── storage/ # local-path provisioner
|
|
│ ├── controllers/
|
|
│ └── databases/
|
|
└── monitoring/
|
|
```
|
|
|
|
## Apply (now)
|
|
|
|
```bash
|
|
kubectl apply -k infrastructure/home
|
|
```
|
|
|
|
That installs storage + the public Gateway. Cilium is already running; its HelmRelease is only for Flux.
|
|
|
|
## Flux (later)
|
|
|
|
When Forgejo is up:
|
|
|
|
```bash
|
|
flux bootstrap git \
|
|
--url=ssh://[email protected]:222/sirius/homek8s.git \
|
|
--branch=master \
|
|
--path=clusters/home
|
|
```
|
|
|
|
`clusters/home/*.yaml` already point at `./apps/home`, `./infrastructure/home`, and `./monitoring/controllers/home`.
|