V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
shuiguomayi
V2EX  ›  Python

Python 版本的 kube-client 如何实现从 pod 里下载文件到 local

  •  
  •   shuiguomayi · 96 天前 · 774 次点击
    这是一个创建于 96 天前的主题,其中的信息可能已经有所发展或是发生改变。

    仔细看了几个帖子

    均以失败告终. 传输文本文件始终是 ok, 传二进制就没有成功过. 即使有数据传过来, 最后 md5 一对比, 发现对不上.

    大拿指导一下.

    beyondstars
        1
    beyondstars  
       96 天前
    既然传文本(姑且假设这里的“文本”指 ASCII 编码范围内的文本,不是指 Unicode )是 OK 的,那你可以把 Pod 里面的二进制 base64 编码成 ASCII 编码的文本内容(存到文件中),然后再把文件传出来,然后再 base64 解码得到最初的二进制。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2861 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 09:40 · PVG 17:40 · LAX 02:40 · JFK 05:40
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.