pykube icon indicating copy to clipboard operation
pykube copied to clipboard

How to do `kubectl cp` with the lib?

Open piontec opened this issue 4 years ago • 1 comments

I need to copy files to/from containers in pods. What's the best way to do that with the pykube lib?

piontec avatar May 19 '20 13:05 piontec

Sadly, kubectl cp is just a kubectl exec 'tar ....', thus it only works with containers that have the tar command installed.

But I agree that having this command is sometimes useful. We've implemented kubectl cp in python but having it natively in pykube could be great

Frankkkkk avatar Jun 04 '20 14:06 Frankkkkk