Workshop wiki · German and English

08 Stateful Postgres

Dieses Lab zeigt eine zustandsbehaftete Datenbank mit StatefulSet, Headless Service, PVC, Init-SQL, Backup-CronJob und NetworkPolicies.

Workshop examples as ZIP files
Learning progress in the web app

Mark chapters as read, view reading progress and check off practice modules after enabling the optional web app. Workshop progress is calculated from chapters across all document pages. Your choices stay on this device; there is no account or server sync. Installation is not required. Withdrawing your choice in Privacy settings deletes the progress.

Reading progress0%
0%
0 / 4 chapters read
Other language versionGreek ↗

08 Stateful Postgres

Dieses Lab zeigt eine zustandsbehaftete Datenbank mit StatefulSet, Headless Service, PVC, Init-SQL, Backup-CronJob und NetworkPolicies.

Prüfen

bash
kubectl apply --dry-run=client -f manifests/
01 / 04

Ausführung

bash
kubectl apply -f manifests/
kubectl rollout status statefulset/postgres -n postgres-lab
kubectl get statefulset,svc,pvc,cronjob -n postgres-lab

Optional kann ein Backup sofort aus dem CronJob erzeugt werden:

bash
kubectl create job manual-postgres-backup \
  --from=cronjob/postgres-backup \
  -n postgres-lab
kubectl wait --for=condition=complete job/manual-postgres-backup -n postgres-lab --timeout=120s
kubectl logs -n postgres-lab job/manual-postgres-backup
02 / 04

Lernpunkte

  • StatefulSet gibt Pods stabile Namen und bindet PVCs an Replikas.
  • Ein Headless Service ist für stabile DNS-Namen zustandsbehafteter Pods nützlich.
  • PGDATA vermeidet Probleme mit automatisch angelegten Verzeichnissen im PVC.
  • Backup-Jobs brauchen eigene Ressourcen, Secrets, Netzwerkfreigaben und Fehlergrenzen.
  • NetworkPolicies müssen Ingress und Egress getrennt modellieren.
03 / 04

Cleanup

bash
kubectl delete namespace postgres-lab

PVCs werden mit dem Namespace gelöscht. In echten Umgebungen wird Storage-Cleanup bewusst separat entschieden.

04 / 04

K8S · Orthevs Academy

31 modules as one continuous learning path.

The sequence remains unchanged: from the lab skeleton through technical foundations and operating models to final troubleshooting. The technical directory names are deliberately preserved.

Orthevs – Engineering the foundation for what comes next.

Orthevs as an app

Install Orthevs

The Orthevs web app can be installed on supported mobile devices and desktop browsers.

iPhone and iPad

Open Orthevs in Safari. Tap Share, then Add to Home Screen. Enable Open as Web App if offered, then tap Add.

Android

For the web app, open the browser menu and choose Install app or Add to Home screen. Confirm the installation.

Desktop browser

Open the browser menu or the install icon in the address bar, then choose Install app or Add to Dock.

Web app installation depends on your browser. If no install prompt appears, follow the browser steps shown above.