I have a Kubernetes redis Pod, which I need to backup/restore its data through dump.rdb. When restore, I put dump.rdb under /data and launch the pod with this config:
containers:
- name: redis
volumeMounts:
- mountPath: /data/
name: data-volume
volumes:
- name: data-volume
hostPath:
path: /data/
type: Directory
It can see the dump.rdb from host's /data dir, but when Redis saves any changes in the Pod, it only updated the /data dir within the Pod not the host. My goal is to be able to backup the dump.rdb on the host, so I need the dump.rdb on the host to get updated too. What am I missing here?