skip to Main Content

So, I need to reverse engineer how an application works and it is deployed on a kubernates pod. This has been assigned to me after the previous developers just "left".

I need to download some files from that pod. I access it using Kubernates Dashboard by clicking the View Logs Button of the Pod.

How can I copy files from this pod to my local? There is a zip file and I want to inspect and read it contents.

How can I download other files?

kubectl cp didn’t work for me.

enter image description here

2

Answers


  1. As a first step please install kubectl.

    Then make sure that you have access to k8s cluster where the pod is running. This is done via kubeconfig. Since you are on AWS it can be done with following command

    aws eks update-kubeconfig --region region-code --name my-cluster
    

    Next is just check execution of command:

    kubectl cp <pod-name>:<fully-qualified-file-name> /<path-to-your-file>/<file-name> -c <container-name>
    
    Login or Signup to reply.
  2. From your description, seems like the terminal window you are showing is inside the pod, so there is no use for kubectl.

    What you need is kubectl in your local terminal. You can follow Michal’s answer on how to connect to the pod.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search