Created
May 6, 2020 03:17
-
-
Save glassonion1/7ea9e9260eed147bccd7ed10e7729dc8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://glassonion.hatenablog.com/entry/2020/04/21/220351