Skip to content

Instantly share code, notes, and snippets.

@sathyanglg
Forked from rajibmitra/redis-deployment.yaml
Created December 16, 2019 16:31
Show Gist options
  • Select an option

  • Save sathyanglg/2f1b926b9df947dc9344a72c3dde3c33 to your computer and use it in GitHub Desktop.

Select an option

Save sathyanglg/2f1b926b9df947dc9344a72c3dde3c33 to your computer and use it in GitHub Desktop.
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: redis
spec:
template:
metadata:
labels:
app: redis
tier: backend
spec:
# Provision a fresh volume for the pod
volumes:
- name: data
emptyDir: {}
containers:
- name: redis
image: kubernetes/redis:v1
ports:
- containerPort: 6379
# Mount the volume into the pod
volumeMounts:
- mountPath: /redis-master-data
name: data # must match the name of the volume, above
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment