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
You can mount a local directory into the pod.
Update your aks-ssh yaml file:
spec: ... containers: ... volumeMounts: - name: test-dir mountPath: /home/azureuser ... volumes: - name: test-dir hostPath: path: /path/to/your/local/dir
Now you can access your files in the local directory.