Hi,
I have data of mongodb which size is 800MB in GCP VM of ubuntu.
I want to push/restore that data into running pod of GKE cluster.
In GKE cluster i deploy mongodb pod/sts/secret using this link
if we compare above YAML and below one is same can i add volumeMounts and volumes into above given link
below is generate by Chatgpt
apiVersion: apps/v1
kind: Deployment
metadata:
name: mongodb-deployment
spec:
replicas: 1
selector:
matchLabels:
app: mongodb
template:
metadata:
labels:
app: mongodb
spec:
containers:
- name: mongodb
image: mongo:latest
volumeMounts:
- name: mongodb-backup
mountPath: /backup
volumes:
- name: mongodb-backup
persistentVolumeClaim:
claimName: mongodb-backup-pvc
All 3 pods are running along secrets
Im very confuse how to do it which should i use
My agenda is to have mongod running like master and slave concept i,e…, primary and secondary pod running in gke if above link is correct then im going correct way if not do send me a new link to achive.
And also i want to have storage of mongodb in gke how to do it that also tell me like using PV,PVC and storageclass
And also if i store data into new disk of GCP and add to PV,PVC will it good or not
How to achieve this please tell me steps or documentation