Tekton Dashboard 安装

Tekton Dashboard 安装

Tekton 提供了dashboard方便用户管理和查看 Tekton PipelineRun 和 TaskRun 以及创建, 执行和完成过程中涉及的资源. 它还允许按标签过滤 PipelineRun 和 TaskRun.

安装方法

kubectl apply --filename https://github.com/tektoncd/dashboard/releases/download/v0.4.1/dashboard_latest_release.yaml

检查dashboard的运行情况, STATUSRunning的话则说明运行成功.

kubectl get pods --namespace tekton-pipelines

访问

访问Tekton的Dashboard有两种方式, 一种是通过port-forward, 另一种是通过ingress来访问.

port-forward

kubectl port-forward svc/tekton-dashboard 9097

ingress

先检查ingress是否开启.

minikube addon list
    
...
- ingress: enabled
...

如果是disabled的话, 通过命令minikube addons enable ingress.

注意: 这里拉取quay.io/kubernetes-ingress-controller/nginx-ingress-controller镜像可能比较慢, 建议使用国内的镜像, 比如quay.mirrors.ustc.edu.cn/kubernetes-ingress-controller/nginx-ingress-controller

修改basic-dashboard-ingress.yaml中的host地址:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: tekton-dashboard
  namespace: tekton-pipelines
spec:
  rules:
  - host: tekton-dashboard.nip.io
    http:
      paths:
      - backend:
          serviceName: tekton-dashboard
          servicePort: 9097

执行kubectl apply -f basic-dashboard-ingress.yaml.

还有最后一步, 在/etc/hosts中添加一条解析x.x.x.x tekton-dashboard.nip.io, ip地址通过minikube ip来获取

浏览器中打开 tekton-dashboard.nip.io

(转载本站文章请注明作者和出处乱世浮生,请勿用于任何商业用途)

comments powered by Disqus