I am trying to copy files from one folder to another folder after start:
containers:
- image: my-image
name: app
volumeMounts:
- name: shared-files
mountPath: /var/folder1
lifecycle:
postStart:
exec:
command: ["/bin/sh", "-c", "cp -r /temp/. /var/fodler1"]
But for some reason files are not copied. When I am executing directly in the pod this command
/bin/sh -c "cp -r /temp/. /var/fodler1"
everything works fine.
What I am doing wrong?