Skip to content

Commit

Permalink
Update hostpath-pv-pvc
Browse files Browse the repository at this point in the history
  • Loading branch information
legah2045 committed Oct 6, 2020
1 parent 1649ae8 commit c3a907b
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions pv-pvc/hostpath-pv-pvc
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,36 @@ spec:
resources:
requests:
storage: 100Mi
---
# Mongo db pod with PVC
apiVersion: apps/v1
kind: ReplicaSet
metadata:
name: mongodbrs
spec:
selector:
matchLabels:
app: mongodb
template:
metadata:
name: mongodbpod
labels:
app: mongodb
spec:
volumes:
- name: mongodb-pvc
persistentVolumeClaim:
claimName: pvc-hostpath
containers:
- name: mongodbcontainer
image: mongo
ports:
- containerPort: 27017
env:
- name: MONGO_INITDB_ROOT_USERNAME
value: devdb
- name: MONGO_INITDB_ROOT_PASSWORD
value: devdb@123
volumeMounts:
- name: mongodb-pvc
mountPath: /data/db

0 comments on commit c3a907b

Please sign in to comment.