I used to create volume in docker-compose in the following manner:
volumes:
- ./server:/home/app
- /home/app/node_modules
I want to do the same on kubernetes
I've created the following config
spec:
containers:
- env: []
image: "image"
volumeMounts:
- mountPath: /home/app
name: vol-app
- mountPath: /home/app/node_modules
name: vol-node-modules
name: demo
volumes:
- name: vol-app
hostPath:
path: /Users/me/server
- name: vol-node-modules
emptyDir: {}
but it doesn't work. the node_modules is empty