Zitat von: Sidey am 12 April 2026, 16:39:46Hi, ich habe den Beitrag erst heute gesehen.
Es ist so, dass im container ein health-check script liegt.
Das script prüft, ob der container noch antwortet. Es legt auch health-check.result an.
Ich habe kein kubernetes zum testen, aber so sollte der health check aussehen, damit das script verwendet wird:
livenessProbe:
exec:
command:
- /bin/bash
- /health-check.sh # Pfad zum Skript im offiziellen Image
initialDelaySeconds: 60 # Puffer für das Laden der fhem.cfg
periodSeconds: 60 # Häufigkeit der Prüfung
timeoutSeconds: 15 # Skript-Laufzeit abwarten
failureThreshold: 3 # Neustart nach 3 Fehlversuchen
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: fhem
namespace: fhem
spec:
replicas: 1
selector:
matchLabels:
app: fhem
template:
metadata:
labels:
app: fhem
spec:
hostNetwork: true # Use host network to allow direct access to devices
containers:
- name: fhem
image: ghcr.io/fhem/fhem-docker:5.2.7-bookworm
lifecycle:
postStart:
exec:
command: ["/bin/sh", "-c", "echo 'ok' > /tmp/health-check.result"]
env:
- name: TZ
value: "Europe/Berlin"
ports:
- containerPort: 8083
volumeMounts:
- name: fhem-data
mountPath: /opt/fhem
resources:
requests:
cpu: "100m"
memory: "256Mi"
limits:
cpu: "500m"
memory: "512Mi"
livenessProbe:
httpGet:
path: /fhem/healthcheck
port: 8083
initialDelaySeconds: 60
periodSeconds: 20
timeoutSeconds: 5
failureThreshold: 3
readinessProbe:
httpGet:
path: /
port: 8083
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 3
volumes:
- name: fhem-data
persistentVolumeClaim:
claimName: fhem-pvc
Zitat von: RalfRog am 12 April 2026, 18:47:26Habe mir zwar mittlerweile auf einem Wyse5070 einen eigenen PBS aufgesetzt aber noch läuft der Tuxis und ein Backup ausser Haus ist ja nicht schlecht.