Mendix-Eks_Deployment: Image disappear after pod are deleted in cloud
Hello, I Have succesfully deployed my application to cloud using Eks. Initially i built a docker image using the docker mendix buildpack (Link):-https://github.com/mendix/docker-mendix-buildpack . after the successful creation of the docker image and storing it in my worker nodes, i pointed the same from the kuberntes-yaml file, the Statefulset i used was.. apiVersion: apps/v1 kind: StatefulSet metadata: name: mendix-k8s-stateful labels: app: mendix-k8s spec: serviceName: mendix-app-service replicas: 1 selector: matchLabels: app: mendix-k8s template: metadata: labels: app: mendix-k8s spec: containers: - name: mendix-app image: <hub-user>/<repo-name>:<tag> imagePullPolicy: Always ports: - containerPort: 8080 volumeMounts: - mountPath: "/build/data/files" name: mendix-data env: - name: ADMIN_PASSWORD valueFrom: secretKeyRef: name: mendix-app-secrets key: admin-password - name: DATABASE_ENDPOINT valueFrom: secretKeyRef: name: mendix-app-secrets key: db-endpoint volumes: - hostPath: path: "/home/docker/mendix-files" name: mendix-data After the application is deployed in the pod. when the application is accessed from cloud (I working on an application which also needs to store photos attached to a specific entity) and each time an image is uploaded, it gets removed when the pod running the application is deleted(I’ve used mysql database and its connected and running perfectly). what i discovered inside the pod storage is that, the upload images from cloud are stored inside a location which i “guess” is specified in the docker-mendixbuildpack github which is “/opt/mendix/build/build/data/files/”. And the Volumemount location which was specified in kubernetes statefulset creates a separate storage location inside the pod(I’m not able to set or connect to the same location as “/opt/mendix/build/build/data/files/” ). so the uploaded images does not remain persistent after deletion of the pods. Query: what should i do to make my Image storage persistent?Please help, been stuck with this issue for quite some time. Thanks & regards..