推荐学习书目
› 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 · Jan 21, 2024 · 3557 views
    This topic created in 1039 days ago, the information mentioned may be changed or developed.

    仔细看了几个帖子

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

    大拿指导一下.

    beyondstars
    beyondstars
    Jan 22, 2024
    1
    既然传文本(姑且假设这里的“文本”指 ASCII 编码范围内的文本,不是指 Unicode )是 OK 的,那你可以把 Pod 里面的二进制 base64 编码成 ASCII 编码的文本内容(存到文件中),然后再把文件传出来,然后再 base64 解码得到最初的二进制。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   3178 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 00:55 · PVG 08:55 · LAX 16:55 · JFK 19:55
    ♥ Do have faith in what you're doing.