cop file from remote conatiner to localmachine?

  devops, docker, kubernetes, linux, macos

how i acces my namespace: kubens namespace
how i access my pod: acces my container: ubectl exec -it dsp-onboarding-6b588fc8c-jz89q –container filebeat — bash

i wante to cp a file from the filebeat container. but not work i try diffrent ways but NO success.

  • kubectl cp dsp-onboarding-6b588fc8c-jz89q:/app/data/logs/dsp-onboarding.json.log .
  • kubectl cp dsp-onboarding-6b588fc8c-jz89q:/app/data/logs/dsp-onboarding.json.log –absolute-names .
  • kubectl cp /app/data/logs/dsp-onboarding.json.log . -c filebeat
  • kubectl cp /app/data/logs/dsp-onboarding.json.log . -c dsp-onboarding-6b588fc8c-jz89q
  • kubectl cp dsp-onboarding filebeat:/tmp/dsp-onboarding.json.log .
  • kubectl cp dsp-onboarding/filebeat:/tmp/dsp-onboarding.json.log .

any one can here help ?? thank you

Source: Docker Questions

LEAVE A COMMENT