This is for troubleshooting/fixing redis that is already running or failing to start.
This is necessary because the PVC is RW once
affinity:
podAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- topologyKey: kubernetes.io/hostname
labelSelector:
matchLabels:
statefulset.kubernetes.io/pod-name: argo-cd-redis-master-0
The name of the claim needs to match that of the running pod
# enter the pod
k exec -it redis-cli -- bash
# backup problem file
# names will vary
cp appendonly.aof.63009.incr.aof appendonly.aof.63009.incr.aofbackup
redis-check-aof appendonly.aof.63009.incr.aof
redis-check-aof --fix appendonly.aof.63009.incr.aof
diff appendonly.aof.63009.incr.aof appendonly.aof.63009.incr.aofbackup