Difficulty: Beginner
Estimated Time: 30

Tekton Dashboard 介绍

在本教程中,我们将学习:

  • 安装 Tekton Dashboard
  • 使用 Tekton Dashboard 导入 Tekton Pipeline
  • 使用 Tekton Dashboard 创建 PipelineResource
  • 使用 Tekton Dashboard 创建 PipelineRun
  • 使用 Tekton Dashboard 查看 PipelineRun 日志

补充资源

了解更多关于 Tekton Dashboard 的信息

https://github.com/tektoncd/dashboard

了解更多关于 Tekton Pipeline 的信息

https://github.com/tektoncd/pipeline

参与到 Tekton 社区中来

https://github.com/tektoncd/community#want-to-get-involved

Tekton Dashboard

Step 1 of 5

安装 Tekton Dashboard

本节将介绍安装 Tekton Dashboard 的方法。

Katacoda Kubernetes 集群

Katacoda 可能需要一两分钟的时间来初始化你的 Kubernetes 集群。当集群初始化完成后,可以使用kubectl cluster-info命令可以查看集群信息。

让我们开始吧!

安装 Tekton Dashboard 前提条件

  • 安装 Tekton Pipelines kubectl apply --filename https://storage.googleapis.com/tekton-releases/pipeline/previous/v0.10.1/release.yaml
  • 安装 Tekton Triggers (可选) kubectl apply --filename https://storage.googleapis.com/tekton-releases/triggers/previous/v0.3.1/release.yaml

确认 pods 正常运行: kubectl get pods -n tekton-pipelines

安装 Tekton Dashboard

可以参考安装说明。执行如下命令,安装 Tekton Dashboard: kubectl apply --filename https://storage.googleapis.com/tekton-releases/dashboard/previous/v0.5.3/tekton-dashboard-release.yaml

确认 Dashboard pods 正常运行: kubectl get pods -n tekton-pipelines

暴露 Tekton Dashboard

安装 Ingress controller

ingress-nginx 命名空间安装 nginx ingress controller: kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/cloud/deploy.yaml

确认 ingress controller pods 正常运行: kubectl get pods -n ingress-nginx

为 Tekton Dashboard 创建 Ingress

查看 Tekton Dashboard Service: kubectl get svc tekton-dashboard -n tekton-pipelines

The Tekton Dashboard Service is exposed on port 9097. So, create an Ingress for the tekton-dashboard Service on port 9097:

Tekton Dashboard Service 暴露的端口为9097,为tekton-dashboard Service 创建一个 Ingress:

cat << EOF | kubectl apply -f -
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: tekton-dashboard
  namespace: tekton-pipelines
spec:
  backend:
    serviceName: tekton-dashboard
    servicePort: 9097
EOF

确认 ingress 创建成功: kubectl get ingress -n tekton-pipelines

打开 Tekton Dashboard

点击 Katacoda 页面的 Dashboard tab ,或者点击如下链接: https://[[HOST_SUBDOMAIN]]-80-[[KATACODA_HOST]].environments.katacoda.com/

设置好 ingress 和 Katacoda,可能需要一分钟的时间。

Dashboard homepage screenshot