kind: StatefulSet
metadata:
namespace: oasis
name: redis-cluster-node-ns
spec:
serviceName: "redis-cluster-svc"
template:
spec:
containers:
volumeMounts:
- name: sys-time
mountPath: /etc/localtime
- name: redisdata
mountPath: /home/redis # pod中docker容器目录,即要被挂载的目录
volumes:
- name: sys-time
hostPath:
path: /etc/localtime
- name: redisdata # 对应前面的volumeMounts name
hostPath:
标签:name,volumeMounts,redis,cluster,本地,挂载,k8s,目录 From: https://www.cnblogs.com/cf211/p/17666906.html