exdx/dcp

Support extracting files from k8s container

Opened this issue · 2 comments

exdx commented

As a user, I would like to debug a live container running in my k8s cluster by copying files from that container's filesystem to my local filesystem.

For example,

dcp --cluster-container namespace/pod -d /tmp/data -c /data

Sounds like a nice feature. Think we should also include a --container for containers running locally as well?

exdx commented

Started implementing this feature in #79. It looks like kube-rs doesn't have a native way to copy files, it relies on tar under the hood, which kubectl cp does as well.

I'm not sure I'm in love with the idea that tar must be present in the container for cp to work. It would prevent copying from containers built from static bases, which is considered a best practice for workloads.

I'm not sure the value of continuing to develop this feature, but if others in the community feel strongly then we can continue exploring it.