kubectl-aks icon indicating copy to clipboard operation
kubectl-aks copied to clipboard

[RFE] Implement `cp` command

Open blanquicet opened this issue 3 years ago • 2 comments

Current situation

kubectl-aks does not provide any way to copy files into nodes.

Ideal future situation

Investigate if it could be useful for users to have a command to copy files from host to nodes:

$ kubectl aks cp --node aks-agentpool-21361837-vmss000000 /source/path/on/host /destination/path/on/node

Start by investigating the current way to do it using the Azure CLI (az) and whether the SDK already provides the APIs to replicate it here or not.

blanquicet avatar Feb 17 '22 07:02 blanquicet

Recently I wrote an application to copy files on Kubernetes environments without container tar command available:

https://github.com/marcio-pessoa/kubectl-cp

marcio-pessoa avatar Dec 05 '23 19:12 marcio-pessoa

Hi @marcio-pessoa, thanks for sharing it. However, with this issue we are looking for an implementation that doesn't use the Kubernetes API server but the Azure API so that it will work even when there are issues with the Kubernetes control plane. In addition, the idea is to copy a file from the localhost to the node itself, not a pod or container.

If you would like to work on this or any other issue, you're more than welcome and we can help you with anything we might need to implement it.

blanquicet avatar Dec 05 '23 20:12 blanquicet