有没有一种方法可以使用 Openshift cli 递归地应用文件夹中的所有文件?

huangapple go评论68阅读模式
英文:

Is there a way to apply all files in a folder using Openshift cli recursively?

问题

可以使用 oc 命令行工具来将一个文件夹中的所有 YAML 文件应用到 Openshift 集群中,类似于使用 kubectl 命令行工具的方式。

英文:

I have a folder of yaml files and I need to apply all files into an Openshift cluster using one command. I know that this can be done via kubectl. Can this be also achieved using oc cli?

答案1

得分: 0

你可以像使用 kubectl 一样执行以下操作:

oc apply -f your/folder/with/yamls

如果要递归执行,可以使用 --recursive 标志:

oc apply -f your/folder/with/yamls --recursive
英文:

You can do it the same way as you can do it with kubectl:

oc apply -f your/folder/with/yamls

If you want it recursively, you can use the --recursive flag:

oc apply -f your/folder/with/yamls --recursive

huangapple
  • 本文由 发表于 2023年5月25日 20:54:10
  • 转载请务必保留本文链接:https://go.coder-hub.com/76332487.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定