简体   繁体   English

无法在 Argo 工作流程中运行 kubectl cp 命令

[英]Not able to run kubectl cp command in Argo workflow

I am trying to run this command in my Argo workflow我正在尝试在我的 Argo 工作流程中运行此命令

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

but I get this error但我得到这个错误

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)

surprisingly when I am copying the file from a pod to local system then it is working, like this command kubectl cp redis-node-0:/data/appendonly.aof tmp/appendonly.aof -c redis -n redis令人惊讶的是,当我将文件从 pod 复制到本地系统时,它正在工作,就像这个命令kubectl cp redis-node-0:/data/appendonly.aof tmp/appendonly.aof -c redis -n redis

Any idea what might be causing it?知道可能是什么原因造成的吗?

Solution - Not sure what was causing this issue but found this command in the docs that worked fine解决方案 - 不确定导致此问题的原因,但在文档中发现此命令运行良好

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM