root@4f9ac7537bd7:/app/ui/sql# kubectl cp 3.7.sql -n cems app-7d76f8e0-ng31-68bfcb4b5b-rj652:/data/web/
root@4f9ac7537bd7:/app/ui/sql# kubectl exec -ti -n cems app-7d76f8e0-ng31-68bfcb4b5b-rj652 /bin/bash
kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead.
root@app-7d76f8e0-ng31-68bfcb4b5b-rj652:/# ls
bin boot data dev docker-entrypoint.d docker-entrypoint.sh etc home lib lib64 media mnt opt proc root run sbin srv sys tmp usr var
root@app-7d76f8e0-ng31-68bfcb4b5b-rj652:/# cd data/web
root@app-7d76f8e0-ng31-68bfcb4b5b-rj652:/data/web# ls
3.7.sql
root@app-7d76f8e0-ng31-68bfcb4b5b-rj652:/data/web#
把pod里文件拷贝出来。。
root@dfa8f00724f0:/tmp# kubectl cp -n cems app-7d76f8e0-nginx11-787f95488f-vwb5r:/data/web/ .