不推荐使用Kubectl Export.任何替代 [英] Kubectl Export is deprecated . Any alternative

查看:304
本文介绍了不推荐使用Kubectl Export.任何替代的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种从部署的组件中导出yaml文件但没有群集特定信息的方法.

I'm looking for a way to export a yaml file from a deployed component but without the cluster specific information.

kubectl get MYOBJECT --export -o yaml > my.yaml

但是由于现在不推荐使用"export"(从1.14版本开始,通常应该在1.18版本中消失(在changelog中找不到)),还有什么替代方法?

but since "export" is now deprecated (since 1.14 and should normally disappear in 1.18 (didn't find it in changelog), what would be an alternative ?

谢谢

推荐答案

由于没有关于清除默认数据和其他实时数据的总体指南,因此没有一致的方法来执行此操作.这就是为什么不推荐使用它的原因.您应该将源文件保存在git或类似文件中.

There is no consistent way to do this since there is no overall guidelines about defaulting and other live data clean up. That is why it was deprecated. You should keep your source files in git or similar.

这篇关于不推荐使用Kubectl Export.任何替代的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆