【问题标题】:Not able to run kubectl cp command in Argo workflow无法在 Argo 工作流程中运行 kubectl cp 命令
【发布时间】:2022-01-29 22:42:21
【问题描述】:

我正在尝试在我的 Argo 工作流程中运行此命令

kubectl cp /tmp/appendonly.aof redis-node-0:/data/appendonly.aof -c redis -n redis

但我收到此错误

Error from server (InternalError): an error on the server ("invalid upgrade response: status code 200") has prevented the request from succeeding (get pods redis-node-0)

令人惊讶的是,当我将文件从 pod 复制到本地系统时,它正在工作,就像这个命令 kubectl cp redis-node-0:/data/appendonly.aof tmp/appendonly.aof -c redis -n redis

知道是什么原因造成的吗?

【问题讨论】:

    标签: kubernetes redis kubectl argo-workflows argo


    【解决方案1】:

    解决方案 - 不确定是什么导致了这个问题,但在 docs 中发现这个命令运行良好

    tar cf - appendonly.aof | kubectl exec -i -n redis redis-node-0 -- tar xf - -C /data

    【讨论】:

    • 您的答案可以通过额外的支持信息得到改进。请edit 添加更多详细信息,例如引用或文档,以便其他人可以确认您的答案是正确的。你可以找到更多关于如何写好答案的信息in the help center
    猜你喜欢
    • 2014-10-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-06-10
    • 1970-01-01
    • 2022-08-16
    • 1970-01-01
    • 2022-10-26
    相关资源
    最近更新 更多