【发布时间】:2021-03-16 10:29:26
【问题描述】:
我想像node example.js|node_modules/bunyan/bin/bunyan 这样通过管道输出我的nodejs 文件以提高可读性。
如何在 yaml 中指定?
我尝试了几种方法,例如:
command:
- node
args:
- index.js | node_modules/bunyan/bin/bunyan
或
command:
- node
args:
- index.js
- node_modules/bunyan/bin/bunyan
或
command:
- node index.js | node_modules/bunyan/bin/bunyan
但没有一个奏效。
是否有可能,如果可以,正确的方法是什么?
【问题讨论】:
-
您能详细说明一下吗?您在 kubernetes 中有带有 nodejs 的 pod,并且您想从该应用程序中输出一些日期到文件?您想从 kubernetes 级别读取 if 吗?你能分享一些背景吗?
标签: node.js kubernetes yaml openshift bunyan