Fix Redis CR permission denied on PVC (needs fsGroup)

redis-nextcloud-0 was CrashLoopBackOff: "mkdir: can't create directory
'/node-conf': Permission denied" and same for appendonlydir - the pod
had no podSecurityContext, so it couldn't write to its own PVC-backed
data directories. Added fsGroup/runAsUser: 1000 matching the
opstree/redis image's default non-root user. Verified live: Redis now
starts cleanly ("Ready to accept connections").
This commit is contained in:
Scooby Husky
2026-08-17 17:20:16 -05:00
parent a8b16fa4cb
commit 9bb4ada1f5
+6
View File
@@ -49,6 +49,12 @@ metadata:
name: redis-nextcloud
namespace: nextcloud
spec:
# Without this, the redis process can't write to its PVC-backed data dirs
# (appendonlydir, node-conf) - "Permission denied", confirmed live 2026-08-17.
# 1000 matches the opstree/redis image's default non-root "redis" user.
podSecurityContext:
fsGroup: 1000
runAsUser: 1000
kubernetesConfig:
image: quay.io/opstree/redis:v7.0.12
imagePullPolicy: IfNotPresent