diff --git a/kubernetes/mongodb-azure-pv-deployment.yaml b/kubernetes/mongodb-azure-pv-deployment.yaml new file mode 100644 index 00000000..9d69cbba --- /dev/null +++ b/kubernetes/mongodb-azure-pv-deployment.yaml @@ -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