How to copy files recursively to a Kubernetes pod? I want to copy files recursively to a Kubernetes pod

I tried kubectl cp -r

I got:
error: unknown shorthand flag: 'r' in -r

What are the best ways to transfer whole directories recursively into a pod.
kubectl cp by default does recursive copies when given a directory, although it seems to be picky about trailing slashes.  If foo is the directory you'd like to copy, simply run

kubectl cp /path/to/foo &lt;pod-id&gt;:/path/in/container/