Skip to content

Instantly share code, notes, and snippets.

@cloudyuga
Last active July 3, 2019 13:07
Show Gist options
  • Select an option

  • Save cloudyuga/f9926cd706df0d26fd19c9add15314fb to your computer and use it in GitHub Desktop.

Select an option

Save cloudyuga/f9926cd706df0d26fd19c9add15314fb to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: mongodb-pv-claim
labels:
app: mongodb
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: rsvp-db
spec:
replicas: 1
template:
metadata:
labels:
appdb: rsvpdb
spec:
containers:
- name: rsvpd-db
image: mongo:3.3
ports:
- containerPort: 27017
volumeMounts:
- name : mongodb-persistent-storage
mountPath : /data/db
volumes:
- name: mongodb-persistent-storage
persistentVolumeClaim:
claimName: mongodb-pv-claim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment