I want to create a script that can tar some files and copy them to my local,
when I created the script as
kubectl exec pod-name -- sh -c 'find /path/to/my/folder/ -mtime -1 -exec tar -cvzf somename.tar.gz'
I’m getting the error exec not found, and also I tried
kubectl exec pod-name -- sh -c 'find /path/to/my/folder/ -mtime -1 -type f|xargs -r tar cvzf somename.tar.gz
but still I can’t execute it
this says tar ended with signal 13
What corrections do I need to make in my script lines so that it can make my work done
I want to get into pod and go to repected folder and collect the files like logs for particular time period in my case for last 24 hours and tar.gz them and copy to my local