Skip to content

Commit

Permalink
Add MongoDB Azure Storage Persistent Volume Deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
muratugureminoglu authored Dec 16, 2024
1 parent d3db23c commit 25c8872
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions kubernetes/mongodb-azure-pv-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: mongodb-azure-managed-disk
namespace: antmedia
spec:
accessModes:
- ReadWriteOnce
storageClassName: managed-csi
resources:
requests:
storage: 10Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: mongo
namespace: antmedia
spec:
selector:
matchLabels:
app: mongo
replicas: 1
template:
metadata:
labels:
app: mongo
spec:
containers:
- name: mongodb
imagePullPolicy: Always
image: mongo:6.0
ports:
- containerPort: 27017
volumeMounts:
- name: mongo-storage
mountPath: /data/db
volumes:
- name: mongo-storage
persistentVolumeClaim:
claimName: mongodb-azure-managed-disk
---
kind: Service
apiVersion: v1
metadata:
name: mongo
namespace: antmedia
spec:
selector:
app: mongo
ports:
- protocol: TCP
port: 27017

0 comments on commit 25c8872

Please sign in to comment.