Monday, August 9, 2021

kubectl : How to copy files from within Docker kubectl into PC/Laptop

//Inside Container
kubectl exec -it -n fda mongodb-2 /bin/bash
cd tmp
mkdir -p 10Aug2021
mongoexport --db fda-platform-extraction --collection cleanup_metadata --out    /tmp/10Aug2021/cleanup_metadata_DEV.json 

//Inside JumpServer
mkdir -p 10Aug2021
cd 10Aug2021
kubectl cp mongodb-2:/tmp/10Aug2021/  .  -n fda

No comments:

Post a Comment

Azure - Pipeline - Add Approver for Stage

https://learn.microsoft.com/en-us/azure/devops/pipelines/process/approvals?view=azure-devops&tabs=check-pass