docs: Hostname-Fix auf MetalLB-IP + int.elbpro.de für alle Services
- 04-traefik: External-IP von Node-IPs auf MetalLB VIP 192.168.11.180 korrigiert, Übersicht aller aktiven Ingresses mit nip.io und int.elbpro.de URLs - 06-rancher: Hostname-Fix .170 → .180, int.elbpro.de hinzugefügt, Fix-Doku - 07-argocd: Hostname-Fix .170 → .180, int.elbpro.de + TLS-Fix dokumentiert Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
# 04 — Traefik Ingress Controller
|
||||
|
||||
**Datum:** 2026-03-17
|
||||
**Datum:** 2026-03-17 (aktualisiert: 2026-03-20)
|
||||
**Version:** Traefik v3.6.9 (Helm Chart traefik-39.0.201+up39.0.2)
|
||||
**Namespace:** kube-system
|
||||
**Quelle:** k3s built-in (automatisch durch k3s installiert)
|
||||
**Externe IP:** 192.168.11.180 (MetalLB LoadBalancer)
|
||||
|
||||
---
|
||||
|
||||
@@ -61,18 +62,21 @@ kubectl get svc traefik -n kube-system
|
||||
|
||||
```
|
||||
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S)
|
||||
traefik LoadBalancer 10.43.61.252 192.168.11.170,192.168.11.171,192.168.11.172 80:31202/TCP,443:32016/TCP
|
||||
traefik LoadBalancer 10.43.61.252 192.168.11.180 80:31202/TCP,443:32016/TCP
|
||||
```
|
||||
|
||||
Traefik ist über alle drei Node-IPs erreichbar:
|
||||
> **Hinweis:** Initial zeigte `EXTERNAL-IP` alle drei Node-IPs (`192.168.11.170-172`).
|
||||
> Nach Installation von MetalLB übernimmt MetalLB die LoadBalancer-IP-Vergabe:
|
||||
> Traefik bekommt `192.168.11.180` (erste IP des MetalLB-Pools).
|
||||
> **Alle Ingress-Hostnamen müssen daher auf `.180` zeigen, nicht auf Node-IPs.**
|
||||
|
||||
| Node | IP | HTTP | HTTPS |
|
||||
Traefik ist über die MetalLB-IP erreichbar:
|
||||
|
||||
| Endpunkt | IP | HTTP | HTTPS |
|
||||
|---|---|---|---|
|
||||
| rnk-cp01 | 192.168.11.170 | :80 | :443 |
|
||||
| rnk-wrk01 | 192.168.11.171 | :80 | :443 |
|
||||
| rnk-wrk02 | 192.168.11.172 | :80 | :443 |
|
||||
| MetalLB VIP | 192.168.11.180 | :80 | :443 |
|
||||
|
||||
NodePorts: `31202` (HTTP), `32016` (HTTPS)
|
||||
NodePorts (intern): `31202` (HTTP), `32016` (HTTPS)
|
||||
|
||||
---
|
||||
|
||||
@@ -190,9 +194,33 @@ spec:
|
||||
|
||||
---
|
||||
|
||||
## Alle aktiven Ingresses (Stand 2026-03-20)
|
||||
|
||||
| Namespace | Service | nip.io URL | int.elbpro.de URL | Protokoll |
|
||||
|---|---|---|---|---|
|
||||
| cattle-system | rancher | rancher.192.168.11.180.nip.io | rancher.int.elbpro.de | HTTPS |
|
||||
| argocd | argocd-server | argocd.192.168.11.180.nip.io | argocd.int.elbpro.de | HTTPS |
|
||||
| gitea | gitea-web | gitea.192.168.11.180.nip.io | gitea.int.elbpro.de | HTTP |
|
||||
| longhorn-system | longhorn-ingress | longhorn.192.168.11.180.nip.io | longhorn.int.elbpro.de | HTTP |
|
||||
| pihole | pihole-web | pihole.192.168.11.180.nip.io/admin | pihole.int.elbpro.de/admin | HTTPS |
|
||||
|
||||
Alle Ingresses zeigen auf `192.168.11.180` (MetalLB VIP → Traefik).
|
||||
|
||||
### int.elbpro.de DNS-Voraussetzung
|
||||
|
||||
```
|
||||
# In Pi-hole (Local DNS Records) oder Omada eintragen:
|
||||
*.int.elbpro.de → 192.168.11.180
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Nächste Schritte
|
||||
|
||||
- [x] MetalLB-IP als Traefik External-IP
|
||||
- [x] Alle Ingresses auf `.180.nip.io` korrigiert
|
||||
- [x] int.elbpro.de Hostnamen für alle Services hinzugefügt
|
||||
- [ ] Wildcard-DNS `*.int.elbpro.de → 192.168.11.180` in Pi-hole eintragen
|
||||
- [ ] Traefik Dashboard per IngressRoute mit BasicAuth exposieren
|
||||
- [ ] Default TLS-Zertifikat konfigurieren (z.B. via cert-manager + Let's Encrypt)
|
||||
- [ ] Wildcard-DNS für `*.homelab.local` auf die Cluster-IPs setzen
|
||||
- [ ] Prometheus-Scraping für Traefik Metrics einrichten
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
# 06 — Rancher
|
||||
|
||||
**Datum:** 2026-03-17
|
||||
**Datum:** 2026-03-17 (aktualisiert: 2026-03-20)
|
||||
**Version:** Rancher v2.13.3 (Helm Chart 2.13.3)
|
||||
**Namespace:** cattle-system
|
||||
**URL:** https://rancher.192.168.11.170.nip.io
|
||||
**URL:** https://rancher.192.168.11.180.nip.io
|
||||
**URL (intern):** https://rancher.int.elbpro.de
|
||||
|
||||
---
|
||||
|
||||
@@ -51,13 +52,17 @@ kubectl create namespace cattle-system
|
||||
helm install rancher rancher-stable/rancher \
|
||||
--namespace cattle-system \
|
||||
--version 2.13.3 \
|
||||
--set hostname=rancher.192.168.11.170.nip.io \
|
||||
--set hostname=rancher.192.168.11.180.nip.io \
|
||||
--set ingress.tls.source=rancher \
|
||||
--set replicas=2 \
|
||||
--wait \
|
||||
--timeout 10m
|
||||
```
|
||||
|
||||
> **Hinweis:** Initial wurde `hostname=rancher.192.168.11.170.nip.io` (Control-Plane-IP)
|
||||
> verwendet. Da Traefik nach MetalLB-Installation auf `192.168.11.180` gebunden ist,
|
||||
> musste der Hostname auf `.180.nip.io` korrigiert werden (siehe Abschnitt "Hostname-Fix").
|
||||
|
||||
**Wichtig — TLS-Quelle:** `ingress.tls.source=rancher` verwendet Rancher's
|
||||
eigene self-signed CA (nicht Let's Encrypt). Siehe Abschnitt "TLS-Entscheidung"
|
||||
weiter unten.
|
||||
@@ -87,7 +92,7 @@ nicht erreichen.
|
||||
helm upgrade rancher rancher-stable/rancher \
|
||||
--namespace cattle-system \
|
||||
--version 2.13.3 \
|
||||
--set hostname=rancher.192.168.11.170.nip.io \
|
||||
--set hostname=rancher.192.168.11.180.nip.io \
|
||||
--set ingress.tls.source=rancher \
|
||||
--set replicas=2
|
||||
```
|
||||
@@ -140,7 +145,7 @@ kubectl get certificate -n cattle-system
|
||||
|
||||
```
|
||||
NAME CLASS HOSTS ADDRESS PORTS
|
||||
rancher traefik rancher.192.168.11.170.nip.io 192.168.11.170,192.168.11.171,192.168.11.172 80, 443
|
||||
rancher traefik rancher.192.168.11.180.nip.io,rancher.int.elbpro.de 192.168.11.180 80, 443
|
||||
|
||||
NAME READY SECRET
|
||||
tls-rancher-ingress True tls-rancher-ingress
|
||||
@@ -156,16 +161,91 @@ rancher cattle-system 2 deployed rancher-2.13.3 v2.13.3
|
||||
```
|
||||
|
||||
Revision 2: Upgrade von `letsEncrypt` → `rancher` TLS-Quelle.
|
||||
Revision 3: Hostname-Fix auf `192.168.11.180.nip.io` + `int.elbpro.de` hinzugefügt.
|
||||
|
||||
---
|
||||
|
||||
## Hostname-Fix (2026-03-20)
|
||||
|
||||
### Problem
|
||||
|
||||
Rancher wurde initial mit `hostname=rancher.192.168.11.170.nip.io` installiert.
|
||||
nip.io löst `.170` auf die Control-Plane-IP auf — dort läuft kein Traefik (Traefik
|
||||
ist nach MetalLB-Installation an `192.168.11.180` gebunden). Ergebnis: Verbindung
|
||||
abgelehnt beim Aufruf der URL.
|
||||
|
||||
### Diagnose
|
||||
|
||||
```bash
|
||||
curl -sk -o /dev/null -w "%{http_code}" https://rancher.192.168.11.170.nip.io
|
||||
# → 000 (Verbindung abgelehnt)
|
||||
|
||||
curl -sk -o /dev/null -w "%{http_code}" https://rancher.192.168.11.180.nip.io
|
||||
# → 404 (Traefik antwortet, aber kein Ingress-Match für diesen Host)
|
||||
```
|
||||
|
||||
### Fix: Helm Upgrade mit korrektem Hostname
|
||||
|
||||
```bash
|
||||
helm upgrade rancher rancher-stable/rancher \
|
||||
--set hostname=rancher.192.168.11.180.nip.io \
|
||||
--set ingress.tls.source=rancher \
|
||||
--set replicas=2 \
|
||||
--reuse-values=false \
|
||||
--wait --timeout 5m
|
||||
```
|
||||
|
||||
Nach dem Upgrade sofort erreichbar:
|
||||
```bash
|
||||
curl -sk -o /dev/null -w "%{http_code}" https://rancher.192.168.11.180.nip.io
|
||||
# → 200
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Interner Hostname: int.elbpro.de (2026-03-20)
|
||||
|
||||
Alle Homelab-Services wurden mit einem zweiten Ingress-Host (`*.int.elbpro.de`)
|
||||
versehen, damit saubere DNS-Namen ohne IP-Einbettung nutzbar sind.
|
||||
|
||||
### Ingress patchen
|
||||
|
||||
```bash
|
||||
kubectl patch ingress rancher -n cattle-system --type=json -p='[
|
||||
{"op":"add","path":"/spec/rules/-","value":{
|
||||
"host":"rancher.int.elbpro.de",
|
||||
"http":{"paths":[{"path":"/","pathType":"Prefix",
|
||||
"backend":{"service":{"name":"rancher","port":{"number":80}}}}]}
|
||||
}}
|
||||
]'
|
||||
```
|
||||
|
||||
### DNS-Voraussetzung
|
||||
|
||||
```
|
||||
# Pi-hole oder Omada: A-Record oder Wildcard
|
||||
*.int.elbpro.de → 192.168.11.180
|
||||
```
|
||||
|
||||
### Aktuelle Ingress-Konfiguration
|
||||
|
||||
```
|
||||
kubectl get ingress rancher -n cattle-system
|
||||
NAME HOSTS
|
||||
rancher rancher.192.168.11.180.nip.io, rancher.int.elbpro.de
|
||||
ADDRESS: 192.168.11.180 PORTS: 80, 443
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Erster Login
|
||||
|
||||
### URL
|
||||
### URLs
|
||||
|
||||
```
|
||||
https://rancher.192.168.11.170.nip.io
|
||||
```
|
||||
| URL | Erreichbar |
|
||||
|---|---|
|
||||
| https://rancher.192.168.11.180.nip.io | immer (nip.io) |
|
||||
| https://rancher.int.elbpro.de | wenn DNS gesetzt (siehe unten) |
|
||||
|
||||
> Browser zeigt Zertifikatswarnung (self-signed CA) → "Trotzdem fortfahren"
|
||||
|
||||
@@ -184,7 +264,7 @@ kubectl get secret --namespace cattle-system bootstrap-secret \
|
||||
### Direkter Setup-Link
|
||||
|
||||
```bash
|
||||
echo https://rancher.192.168.11.170.nip.io/dashboard/?setup=$(kubectl get secret \
|
||||
echo https://rancher.192.168.11.180.nip.io/dashboard/?setup=$(kubectl get secret \
|
||||
--namespace cattle-system bootstrap-secret \
|
||||
-o go-template='{{.data.bootstrapPassword|base64decode}}')
|
||||
```
|
||||
@@ -193,8 +273,11 @@ echo https://rancher.192.168.11.170.nip.io/dashboard/?setup=$(kubectl get secret
|
||||
|
||||
## Nächste Schritte
|
||||
|
||||
- [ ] Ersten Login durchführen, Admin-Passwort setzen
|
||||
- [x] Ersten Login durchführen, Admin-Passwort setzen
|
||||
- [x] Hostname auf MetalLB-IP korrigiert
|
||||
- [x] int.elbpro.de Hostname hinzugefügt
|
||||
- [ ] Cluster in Rancher registrieren / importieren
|
||||
- [ ] Longhorn-Storage in Rancher-UI prüfen
|
||||
- [ ] User und Rollen konfigurieren
|
||||
- [ ] Rancher-eigenen Monitoring-Stack prüfen (optional)
|
||||
- [ ] Wildcard-DNS `*.int.elbpro.de → 192.168.11.180` in Pi-hole eintragen
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
# 07 — ArgoCD
|
||||
|
||||
**Datum:** 2026-03-17
|
||||
**Datum:** 2026-03-17 (aktualisiert: 2026-03-20)
|
||||
**Version:** ArgoCD v3.3.4 (Helm Chart argo-cd-9.4.12)
|
||||
**Namespace:** argocd
|
||||
**URL:** https://argocd.192.168.11.170.nip.io
|
||||
**URL:** https://argocd.192.168.11.180.nip.io
|
||||
**URL (intern):** https://argocd.int.elbpro.de
|
||||
|
||||
---
|
||||
|
||||
@@ -53,7 +54,7 @@ helm install argocd argo/argo-cd \
|
||||
--version 9.4.12 \
|
||||
--set server.ingress.enabled=true \
|
||||
--set server.ingress.ingressClassName=traefik \
|
||||
--set "server.ingress.hostname=argocd.192.168.11.170.nip.io" \
|
||||
--set "server.ingress.hostname=argocd.192.168.11.180.nip.io" \
|
||||
--set "server.ingress.tls=true" \
|
||||
--set configs.params."server\.insecure"=true \
|
||||
--set "server.ingress.annotations.traefik\.ingress\.kubernetes\.io/router\.entrypoints=websecure" \
|
||||
@@ -119,7 +120,7 @@ kubectl get ingress -n argocd
|
||||
|
||||
```
|
||||
NAME CLASS HOSTS ADDRESS PORTS
|
||||
argocd-server traefik argocd.192.168.11.170.nip.io 192.168.11.170,192.168.11.171,192.168.11.172 80, 443
|
||||
argocd-server traefik argocd.192.168.11.180.nip.io,argocd.int.elbpro.de 192.168.11.180 80, 443
|
||||
```
|
||||
|
||||
TLS wird von Traefik terminiert. ArgoCD selbst läuft im `insecure`-Modus
|
||||
@@ -129,13 +130,15 @@ TLS wird von Traefik terminiert. ArgoCD selbst läuft im `insecure`-Modus
|
||||
|
||||
## Erster Login
|
||||
|
||||
### URL
|
||||
### URLs
|
||||
|
||||
```
|
||||
https://argocd.192.168.11.170.nip.io
|
||||
```
|
||||
| URL | Erreichbar |
|
||||
|---|---|
|
||||
| https://argocd.192.168.11.180.nip.io | immer (nip.io) |
|
||||
| https://argocd.int.elbpro.de | wenn DNS gesetzt |
|
||||
|
||||
> Browser zeigt Zertifikatswarnung (Traefik self-signed) → "Trotzdem fortfahren"
|
||||
> **Wichtig:** Nur HTTPS funktioniert — HTTP → 404 (Traefik `websecure`-Entrypoint)
|
||||
|
||||
### Zugangsdaten
|
||||
|
||||
@@ -166,7 +169,8 @@ NAME NAMESPACE REVISION STATUS CHART APP VERSION
|
||||
argocd argocd 2 deployed argo-cd-9.4.12 v3.3.4
|
||||
```
|
||||
|
||||
Revision 2: Hostname-Fix von `argocd.example.com` → `argocd.192.168.11.170.nip.io`
|
||||
Revision 2: Hostname-Fix von `argocd.example.com` → `argocd.192.168.11.180.nip.io`
|
||||
Revision 3: int.elbpro.de Hostname + TLS-Fix (2026-03-20)
|
||||
|
||||
---
|
||||
|
||||
@@ -179,7 +183,7 @@ curl -sSL -o /usr/local/bin/argocd \
|
||||
chmod +x /usr/local/bin/argocd
|
||||
|
||||
# Login
|
||||
argocd login argocd.192.168.11.170.nip.io \
|
||||
argocd login argocd.192.168.11.180.nip.io \
|
||||
--username admin \
|
||||
--password T8T1rLY0ac2MqWiC \
|
||||
--insecure
|
||||
@@ -216,11 +220,68 @@ kubectl apply -f my-app.yaml
|
||||
|
||||
---
|
||||
|
||||
## Hostname-Fix (2026-03-20)
|
||||
|
||||
### Problem
|
||||
|
||||
ArgoCD-Ingress zeigte auf `argocd.192.168.11.170.nip.io` (Control-Plane-IP).
|
||||
Traefik läuft nach MetalLB-Installation auf `192.168.11.180` → URL nicht erreichbar.
|
||||
|
||||
### Fix: Ingress direkt patchen
|
||||
|
||||
```bash
|
||||
kubectl -n argocd patch ingress argocd-server --type=json -p='[
|
||||
{"op":"replace","path":"/spec/rules/0/host","value":"argocd.192.168.11.180.nip.io"},
|
||||
{"op":"replace","path":"/spec/tls/0/hosts/0","value":"argocd.192.168.11.180.nip.io"}
|
||||
]'
|
||||
```
|
||||
|
||||
> Der Helm-Chart bietet keinen einfachen `helm upgrade`-Parameter für den
|
||||
> Ingress-Hostnamen im Nachhinein — daher direkter kubectl-Patch.
|
||||
|
||||
---
|
||||
|
||||
## Interner Hostname: int.elbpro.de (2026-03-20)
|
||||
|
||||
### Ingress-Rule hinzufügen
|
||||
|
||||
```bash
|
||||
kubectl patch ingress argocd-server -n argocd --type=json -p='[
|
||||
{"op":"add","path":"/spec/rules/-","value":{
|
||||
"host":"argocd.int.elbpro.de",
|
||||
"http":{"paths":[{"path":"/","pathType":"Prefix",
|
||||
"backend":{"service":{"name":"argocd-server","port":{"number":80}}}}]}
|
||||
}}
|
||||
]'
|
||||
```
|
||||
|
||||
### TLS-Abschnitt erweitern
|
||||
|
||||
**Wichtig:** Ohne TLS-Eintrag liefert Traefik 404 für den neuen Hostnamen,
|
||||
weil der `websecure`-Entrypoint keinen passenden Route-Match findet.
|
||||
|
||||
```bash
|
||||
kubectl patch ingress argocd-server -n argocd --type=json -p='[
|
||||
{"op":"add","path":"/spec/tls/0/hosts/-","value":"argocd.int.elbpro.de"}
|
||||
]'
|
||||
```
|
||||
|
||||
### DNS-Voraussetzung
|
||||
|
||||
```
|
||||
*.int.elbpro.de → 192.168.11.180
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Nächste Schritte
|
||||
|
||||
- [ ] Erstes Git-Repository in ArgoCD registrieren
|
||||
- [x] Erstes Git-Repository in ArgoCD registrieren (Gitea via SSH)
|
||||
- [x] Homelab-Manifeste in Git-Repository abgelegt
|
||||
- [x] ArgoCD Apps für pihole, gitea, metallb-config erstellt
|
||||
- [x] Hostname auf MetalLB-IP korrigiert
|
||||
- [x] int.elbpro.de Hostname hinzugefügt
|
||||
- [ ] Admin-Passwort ändern und Initial-Secret löschen
|
||||
- [ ] Homelab-Manifeste in Git-Repository ablegen
|
||||
- [ ] ArgoCD App für Longhorn/cert-manager Konfiguration erstellen
|
||||
- [ ] SSO via Dex konfigurieren (optional)
|
||||
- [ ] Notifications für Sync-Status einrichten (optional)
|
||||
- [ ] Wildcard-DNS `*.int.elbpro.de → 192.168.11.180` in Pi-hole eintragen
|
||||
|
||||
Reference in New Issue
Block a user