【Argo Workflow】二、创建一个Hello World例子

我们使用Argo UI来提交我们的Hello World例子,yaml文件如下

metadata:
  generateName: hello-world-    # name of the workflow spec
spec:
  entrypoint: whalesay          # invoke the whalesay template
  templates:
    - name: whalesay              # name of the template
      container:
        image: docker/whalesay
        command: [ cowsay ]
        args: [ "hello world" ]
        resources: # limit the resources
          limits:
            memory: 32Mi
            cpu: 100m

和官网的案例不同,我们这里去除了apiVersion和kind,因为Argo UI在提交的时候帮我们自动添加上。

找到此按钮,点击提交一个新的workflow,之后选择 Edit using full workflow options,将yaml粘贴到对应位置,创建即可。

image.png

image.png
image.png

创建完成之后我们会在列表中看到一个正在执行中的workflow

image.png

点击这个workflow可以查看更多的信息,按照顺序依次点击,可以查看我们的运行日志。

image.png

日志中显示运行结果如下,就代表我们的Hello World例子执行成功了!

W
time="2022-07-20T15:05:33.901Z" level=info msg="capturing logs" argo=true
 _____________
< hello world >
 -------------
    \
     \
      \
                    ##        .
              ## ## ##       ==
           ## ## ## ##      ===
       /""""""""""""""""___/ ===
  ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ /  ===- ~~~
       \______ o          __/
        \    \        __/
          \____\______/
time="2022-07-20T15:05:35.101Z" level=info msg="sub-process exited" argo=true error="<nil>"
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容