Skip to content

Instantly share code, notes, and snippets.

@gosuri
Created April 25, 2017 02:01
Show Gist options
  • Save gosuri/cd961ff5010a9b1420403d8a548febcd to your computer and use it in GitHub Desktop.
Save gosuri/cd961ff5010a9b1420403d8a548febcd to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: Pod
metadata:
name: redis
labels:
name: redis
spec:
volumes:
- name: redis-storage
persistentVolumeClaim:
claimName: redis-claim
containers:
- name: redis
image: quay.io/ovrclk/redis:latest-gosuri
imagePullPolicy: IfNotPresent
args:
- redis-server
- --appendonly
- "yes"
ports:
- containerPort: 6379
name: tcp
protocol: TCP
volumeMounts:
- mountPath: /data
name: redis-storage
---
kind: PersistentVolume
metadata:
name: redispv
spec:
capacity:
storage: 8Gi
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
awsElasticBlockStore:
volumeID: vol-06c41fd7e6a3a5eb6
fsType: ext4
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: redis-claim
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 8Gi
volumeName: redispv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment