生成tekton dashboard

2024-09-06 18:36
文章标签 生成 dashboard tekton

本文主要是介绍生成tekton dashboard,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

我们在之前的(安装和构建ci)实践中,用到都是tekton cli,查看ci执行情况都是通过logs,不是很友好。 tekton dashboard提供了很多的ui界面。这里我们来安装并使用。

1. 创建dashboard.yaml

apiVersion: v1
kind: Namespace
metadata:labels:app.kubernetes.io/instance: defaultapp.kubernetes.io/part-of: tekton-dashboardname: tekton-dashboard
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:labels:app.kubernetes.io/component: dashboardapp.kubernetes.io/instance: defaultapp.kubernetes.io/part-of: tekton-dashboardname: extensions.dashboard.tekton.dev
spec:group: dashboard.tekton.devnames:categories:- tekton- tekton-dashboardkind: Extensionplural: extensionsshortNames:- ext- extspreserveUnknownFields: falsescope: Namespacedversions:- additionalPrinterColumns:- jsonPath: .spec.apiVersionname: API versiontype: string- jsonPath: .spec.namename: Kindtype: string- jsonPath: .spec.displaynamename: Display nametype: string- jsonPath: .metadata.creationTimestampname: Agetype: datename: v1alpha1schema:openAPIV3Schema:type: objectx-kubernetes-preserve-unknown-fields: trueserved: truestorage: truesubresources:status: {}
---
apiVersion: v1
kind: ServiceAccount
metadata:labels:app.kubernetes.io/component: dashboardapp.kubernetes.io/instance: defaultapp.kubernetes.io/part-of: tekton-dashboardname: tekton-dashboardnamespace: tekton-pipelines
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:labels:app.kubernetes.io/instance: defaultapp.kubernetes.io/part-of: tekton-dashboardname: tekton-dashboard-infonamespace: tekton-pipelines
rules:- apiGroups:- ""resourceNames:- dashboard-inforesources:- configmapsverbs:- get
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:labels:app.kubernetes.io/component: dashboardapp.kubernetes.io/instance: defaultapp.kubernetes.io/part-of: tekton-dashboardname: tekton-dashboard-backend
rules:- apiGroups:- apiextensions.k8s.ioresources:- customresourcedefinitionsverbs:- get- list- apiGroups:- security.openshift.ioresources:- securitycontextconstraintsverbs:- use- apiGroups:- tekton.devresources:- clustertasksverbs:- get- list- watch- apiGroups:- triggers.tekton.devresources:- clusterinterceptors- clustertriggerbindingsverbs:- get- list- watch- apiGroups:- ""resources:- serviceaccountsverbs:- get- list- watch- apiGroups:- dashboard.tekton.devresources:- extensionsverbs:- create- update- delete- patch- apiGroups:- tekton.devresources:- clustertasksverbs:- create- update- delete- patch- apiGroups:- triggers.tekton.devresources:- clusterinterceptors- clustertriggerbindingsverbs:- create- update- delete- patch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:labels:app.kubernetes.io/component: dashboardapp.kubernetes.io/instance: defaultapp.kubernetes.io/part-of: tekton-dashboardname: tekton-dashboard-tenant
rules:- apiGroups:- dashboard.tekton.devresources:- extensionsverbs:- get- list- watch- apiGroups:- ""resources:- events- namespaces- pods- pods/logverbs:- get- list- watch- apiGroups:- tekton.devresources:- tasks- taskruns- pipelines- pipelineruns- customrunsverbs:- get- list- watch- apiGroups:- triggers.tekton.devresources:- eventlisteners- interceptors- triggerbindings- triggers- triggertemplatesverbs:- get- list- watch- apiGroups:- tekton.devresources:- tasks- taskruns- pipelines- pipelineruns- customrunsverbs:- create- update- delete- patch- apiGroups:- triggers.tekton.devresources:- eventlisteners- interceptors- triggerbindings- triggers- triggertemplatesverbs:- create- update- delete- patch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:labels:app.kubernetes.io/instance: defaultapp.kubernetes.io/part-of: tekton-dashboardname: tekton-dashboard-infonamespace: tekton-pipelines
roleRef:apiGroup: rbac.authorization.k8s.iokind: Rolename: tekton-dashboard-info
subjects:- apiGroup: rbac.authorization.k8s.iokind: Groupname: system:authenticated
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:labels:app.kubernetes.io/component: dashboardapp.kubernetes.io/instance: defaultapp.kubernetes.io/part-of: tekton-dashboardrbac.dashboard.tekton.dev/subject: tekton-dashboardname: tekton-dashboard-backend
roleRef:apiGroup: rbac.authorization.k8s.iokind: ClusterRolename: tekton-dashboard-backend
subjects:- kind: ServiceAccountname: tekton-dashboardnamespace: tekton-pipelines
---
apiVersion: v1
data:version: v0.42.0
kind: ConfigMap
metadata:labels:app.kubernetes.io/instance: defaultapp.kubernetes.io/part-of: tekton-dashboardname: dashboard-infonamespace: tekton-pipelines
---
apiVersion: v1
kind: Service
metadata:labels:app: tekton-dashboardapp.kubernetes.io/component: dashboardapp.kubernetes.io/instance: defaultapp.kubernetes.io/name: dashboardapp.kubernetes.io/part-of: tekton-dashboardapp.kubernetes.io/version: v0.42.0dashboard.tekton.dev/release: v0.42.0version: v0.42.0name: tekton-dashboardnamespace: tekton-pipelines
spec:ports:- name: httpport: 9097protocol: TCPtargetPort: 9097selector:app.kubernetes.io/component: dashboardapp.kubernetes.io/instance: defaultapp.kubernetes.io/name: dashboardapp.kubernetes.io/part-of: tekton-dashboardtype: LoadBalancer
---
apiVersion: apps/v1
kind: Deployment
metadata:labels:app: tekton-dashboardapp.kubernetes.io/component: dashboardapp.kubernetes.io/instance: defaultapp.kubernetes.io/name: dashboardapp.kubernetes.io/part-of: tekton-dashboardapp.kubernetes.io/version: v0.42.0dashboard.tekton.dev/release: v0.42.0version: v0.42.0name: tekton-dashboardnamespace: tekton-pipelines
spec:replicas: 1selector:matchLabels:app.kubernetes.io/component: dashboardapp.kubernetes.io/instance: defaultapp.kubernetes.io/name: dashboardapp.kubernetes.io/part-of: tekton-dashboardtemplate:metadata:labels:app: tekton-dashboardapp.kubernetes.io/component: dashboardapp.kubernetes.io/instance: defaultapp.kubernetes.io/name: dashboardapp.kubernetes.io/part-of: tekton-dashboardapp.kubernetes.io/version: v0.42.0name: tekton-dashboardspec:containers:- args:- --port=9097- --logout-url=- --pipelines-namespace=tekton-pipelines- --triggers-namespace=tekton-pipelines- --read-only=false- --log-level=info- --log-format=json- --namespace=- --namespaces=- --stream-logs=true- --external-logs=env:- name: INSTALLED_NAMESPACEvalueFrom:fieldRef:fieldPath: metadata.namespaceimage: registry.cn-hangzhou.aliyuncs.com/acs-demo-ns/tekton-dashboard:v0.42.0livenessProbe:httpGet:path: /healthport: 9097name: tekton-dashboardports:- containerPort: 9097readinessProbe:httpGet:path: /readinessport: 9097securityContext:allowPrivilegeEscalation: falsecapabilities:drop:- ALLrunAsGroup: 65532runAsNonRoot: truerunAsUser: 65532seccompProfile:type: RuntimeDefaultserviceAccountName: tekton-dashboardvolumes: []---
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:labels:app.kubernetes.io/component: dashboardapp.kubernetes.io/instance: defaultapp.kubernetes.io/part-of: tekton-dashboardrbac.dashboard.tekton.dev/subject: tekton-dashboardname: tekton-dashboard-tenant
roleRef:apiGroup: rbac.authorization.k8s.iokind: ClusterRolename: tekton-dashboard-tenant
subjects:- kind: ServiceAccountname: tekton-dashboardnamespace: tekton-pipelines

2. 安装dashboard

kubectl apply -f dashboard.yaml 

3. 查看dashboard

kubectl get deploy -n tekton-pipelines | grep dashboard
kubectl get svc -n tekton-pipelines | grep dashboard

我的输出为:

carawang@ci %kubectl get svc -n tekton-pipelines | grep dashboard
tekton-dashboard                    LoadBalancer   10.103.207.156   <pending>     9097:30755/TCP                       4m52s

因为我用的是minikube,没有endpoint可以供访问,需要forward一下。

4. forward dashboard

kubectl port-forward -n tekton-pipelines service/tekton-dashboard 9097:9097

不报错的话,就可以访问http://localhost:9097

5. 查看pipelineruns等

可以看到界面很友好。

这篇关于生成tekton dashboard的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1142798

相关文章

java中使用POI生成Excel并导出过程

《java中使用POI生成Excel并导出过程》:本文主要介绍java中使用POI生成Excel并导出过程,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录需求说明及实现方式需求完成通用代码版本1版本2结果展示type参数为atype参数为b总结注:本文章中代码均为

在java中如何将inputStream对象转换为File对象(不生成本地文件)

《在java中如何将inputStream对象转换为File对象(不生成本地文件)》:本文主要介绍在java中如何将inputStream对象转换为File对象(不生成本地文件),具有很好的参考价... 目录需求说明问题解决总结需求说明在后端中通过POI生成Excel文件流,将输出流(outputStre

C/C++随机数生成的五种方法

《C/C++随机数生成的五种方法》C++作为一种古老的编程语言,其随机数生成的方法已经经历了多次的变革,早期的C++版本使用的是rand()函数和RAND_MAX常量,这种方法虽然简单,但并不总是提供... 目录C/C++ 随机数生成方法1. 使用 rand() 和 srand()2. 使用 <random

Flask 验证码自动生成的实现示例

《Flask验证码自动生成的实现示例》本文主要介绍了Flask验证码自动生成的实现示例,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习... 目录生成图片以及结果处理验证码蓝图html页面展示想必验证码大家都有所了解,但是可以自己定义图片验证码

Python如何在Word中生成多种不同类型的图表

《Python如何在Word中生成多种不同类型的图表》Word文档中插入图表不仅能直观呈现数据,还能提升文档的可读性和专业性,本文将介绍如何使用Python在Word文档中创建和自定义各种图表,需要的... 目录在Word中创建柱形图在Word中创建条形图在Word中创建折线图在Word中创建饼图在Word

nginx生成自签名SSL证书配置HTTPS的实现

《nginx生成自签名SSL证书配置HTTPS的实现》本文主要介绍在Nginx中生成自签名SSL证书并配置HTTPS,包括安装Nginx、创建证书、配置证书以及测试访问,具有一定的参考价值,感兴趣的可... 目录一、安装nginx二、创建证书三、配置证书并验证四、测试一、安装nginxnginx必须有"-

Java实战之利用POI生成Excel图表

《Java实战之利用POI生成Excel图表》ApachePOI是Java生态中处理Office文档的核心工具,这篇文章主要为大家详细介绍了如何在Excel中创建折线图,柱状图,饼图等常见图表,需要的... 目录一、环境配置与依赖管理二、数据源准备与工作表构建三、图表生成核心步骤1. 折线图(Line Ch

浅析如何使用Swagger生成带权限控制的API文档

《浅析如何使用Swagger生成带权限控制的API文档》当涉及到权限控制时,如何生成既安全又详细的API文档就成了一个关键问题,所以这篇文章小编就来和大家好好聊聊如何用Swagger来生成带有... 目录准备工作配置 Swagger权限控制给 API 加上权限注解查看文档注意事项在咱们的开发工作里,API

Java使用POI-TL和JFreeChart动态生成Word报告

《Java使用POI-TL和JFreeChart动态生成Word报告》本文介绍了使用POI-TL和JFreeChart生成包含动态数据和图表的Word报告的方法,并分享了实际开发中的踩坑经验,通过代码... 目录前言一、需求背景二、方案分析三、 POI-TL + JFreeChart 实现3.1 Maven

MybatisGenerator文件生成不出对应文件的问题

《MybatisGenerator文件生成不出对应文件的问题》本文介绍了使用MybatisGenerator生成文件时遇到的问题及解决方法,主要步骤包括检查目标表是否存在、是否能连接到数据库、配置生成... 目录MyBATisGenerator 文件生成不出对应文件先在项目结构里引入“targetProje