I\'m trying to copy files from Kubernetes Pods to my local system. I am getting the below error while running following command:
kubectl cp aks-ssh2-6cd4948
According to https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands
kubectl cp
is equivalent to using
kubectl exec -n
So technically if you do not have tar installed on the pod, you can do kubectl exec -n
Assuming the file is small or already compressed, the effect should be the same, except you cannot use cat on a directory or a set of files.