Skip to content

Instantly share code, notes, and snippets.

@glassonion1
Created May 6, 2020 03:17
Show Gist options
  • Save glassonion1/7ea9e9260eed147bccd7ed10e7729dc8 to your computer and use it in GitHub Desktop.
Save glassonion1/7ea9e9260eed147bccd7ed10e7729dc8 to your computer and use it in GitHub Desktop.
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: redis
spec:
serviceName: redis
selector:
matchLabels:
redis-app: redis
replicas: 3
template:
metadata:
labels:
redis-app: redis
spec:
containers:
- name: redis
command: [sh, -c, source /config/launch.sh]
image: redis:5-alpine
ports:
- containerPort: 6379
volumeMounts:
- mountPath: /config
name: config
- mountPath: /redis-data
name: data
volumes:
- configMap:
name: redis-config
name: config
- emptyDir:
name: data
@glassonion1
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment