So far all we've done is create an empty persistent volume. Let's get the api application to use it.
Use your crawler deployment and the docs as a reference. Create a new volume in the api-deployment referencing your pvc:
volumes:
- name: synergychat-api-volume
persistentVolumeClaim:
claimName: synergychat-api-pvc
Then mount it in the container under the /persist directory:
volumeMounts:
- name: synergychat-api-volume
mountPath: /persist
Update the API_DB_FILEPATH environment variable you added earlier to instead use the new mount path: /persist/db.json
Apply the changes, then check to make sure all your pods are healthy:
kubectl get pods
With your tunnel running (minikube tunnel -c), open http://synchat.internal/ in your browser.
api pod.