Skip to content

Instantly share code, notes, and snippets.

@slmingol slmingol/pvc.yaml forked from cloudyuga/pvc.yaml
Created Jul 3, 2019

Embed
What would you like to do?
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
You can’t perform that action at this time.