文档

开启Workflow UI

更新时间:

Workflow提供了一套UI来展示目前工作流的状态,方便查看每个步骤的容器日志,下面为您介绍如何使用Ingress暴露UI访问端点。

前提条件

操作步骤

  1. 执行htpasswd命令生成auth文件,用于存放用户名和密码。

    执行命令:

    htpasswd -c auth workflow

    预期输出:

    New password: <workflow>
    New password:
    Re-type new password:
    Adding password for user workflow
  2. 执行如下命令,创建Secret来在Kubernetes集群中存放此加密文件。

    kubectl create secret generic workflow-basic-auth --from-file=auth -n argo
  3. 创建并复制内容到ingress yaml文件中,并执行kubectl apply -f ingress.yaml命令,创建workflow-ingress路由。

    apiVersion: networking.k8s.io/v1
    kind: Ingress
    metadata:
      name: workflow-ingress
      namespace: argo
      annotations:
        # type of authentication
        nginx.ingress.kubernetes.io/auth-type: basic
        # name of the secret that contains the user/password definitions
        nginx.ingress.kubernetes.io/auth-secret: workflow-basic-auth
        # message to display with an appropriate context why the authentication is required
        nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required - workflow'
    spec:
      rules:
      - host: workflow.<yourTestHost>
        http:
          paths:
          - path: /
            backend:
              service: 
                name: argo-ui
                port:
                  number: 80
            pathType: ImplementationSpecific
    说明

    此处的host需要替换成您对应的集群地址,即您使用的域名,例如workflow.example.com。

  4. 在浏览器输入workflow.<yourTestHost>,按照提示输入密码就能看到如下界面。

    开启workflow

    您可以根据需要查看工作流的状态。查看工作量状态

  • 本页导读 (1)
文档反馈