Kubectl 导出已弃用.任何替代方案 [英] Kubectl Export is deprecated . Any alternative

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

问题描述

我正在寻找一种从部署的组件导出 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

但是由于导出"现在已被弃用(从 1.14 开始,通常应该在 1.18 中消失(在变更日志中没有找到),还有什么替代方法?

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 导出已弃用.任何替代方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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