部署 Tekton Pipelines v0.54.0
环境要求
1. 运行 1.25 或更高版本的Kubernetes 集群;
2. 集群上要启用了RBAC鉴权插件;
3. 拥有管理员权限(绑定到了clusterrole/cluster-admin)的用户;
部署 Tekton Piplines
下载 Tekton Piplines 部署清单
# wget https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml
替换 gcr.io
# sed -i 's@gcr.io@gcr.dockerproxy.com@g' release.yaml
部署 Tekton Piplines
# kubectl apply -f release.yaml
namespace/tekton-pipelines created
clusterrole.rbac.authorization.k8s.io/tekton-pipelines-controller-cluster-access created
clusterrole.rbac.authorization.k8s.io/tekton-pipelines-controller-tenant-access created
clusterrole.rbac.authorization.k8s.io/tekton-pipelines-webhook-cluster-access created
clusterrole.rbac.authorization.k8s.io/tekton-events-controller-cluster-access created
role.rbac.authorization.k8s.io/tekton-pipelines-controller created
role.rbac.authorization.k8s.io/tekton-pipelines-webhook created
role.rbac.authorization.k8s.io/tekton-pipelines-events-controller created
role.rbac.authorization.k8s.io/tekton-pipelines-leader-election created
role.rbac.authorization.k8s.io/tekton-pipelines-info created
serviceaccount/tekton-pipelines-controller created
serviceaccount/tekton-pipelines-webhook created
serviceaccount/tekton-events-controller created
clusterrolebinding.rbac.authorization.k8s.io/tekton-pipelines-controller-cluster-access created
clusterrolebinding.rbac.authorization.k8s.io/tekton-pipelines-controller-tenant-access created
clusterrolebinding.rbac.authorization.k8s.io/tekton-pipelines-webhook-cluster-access created
clusterrolebinding.rbac.authorization.k8s.io/tekton-events-controller-cluster-access created
rolebinding.rbac.authorization.k8s.io/tekton-pipelines-controller created
rolebinding.rbac.authorization.k8s.io/tekton-pipelines-webhook created
rolebinding.rbac.authorization.k8s.io/tekton-pipelines-controller-leaderelection created
rolebinding.rbac.authorization.k8s.io/tekton-pipelines-webhook-leaderelection created
rolebinding.rbac.authorization.k8s.io/tekton-pipelines-info created
rolebinding.rbac.authorization.k8s.io/tekton-pipelines-events-controller created
rolebinding.rbac.authorization.k8s.io/tekton-events-controller-leaderelection created
customresourcedefinition.apiextensions.k8s.io/clustertasks.tekton.dev created
customresourcedefinition.apiextensions.k8s.io/customruns.tekton.dev created
customresourcedefinition.apiextensions.k8s.io/pipelines.tekton.dev created
customresourcedefinition.apiextensions.k8s.io/pipelineruns.tekton.dev created
customresourcedefinition.apiextensions.k8s.io/resolutionrequests.resolution.tekton.dev created
customresourcedefinition.apiextensions.k8s.io/stepactions.tekton.dev created
customresourcedefinition.apiextensions.k8s.io/tasks.tekton.dev created
customresourcedefinition.apiextensions.k8s.io/taskruns.tekton.dev created
customresourcedefinition.apiextensions.k8s.io/verificationpolicies.tekton.dev created
secret/webhook-certs created
validatingwebhookconfiguration.admissionregistration.k8s.io/validation.webhook.pipeline.tekton.dev created
mutatingwebhookconfiguration.admissionregistration.k8s.io/webhook.pipeline.tekton.dev created
validatingwebhookconfiguration.admissionregistration.k8s.io/config.webhook.pipeline.tekton.dev created
clusterrole.rbac.authorization.k8s.io/tekton-aggregate-edit created
clusterrole.rbac.authorization.k8s.io/tekton-aggregate-view created
configmap/config-defaults created
configmap/config-events created
configmap/feature-flags created
configmap/pipelines-info created
configmap/config-leader-election-controller created
configmap/config-leader-election-events created
configmap/config-leader-election-webhook created
configmap/config-logging created
configmap/config-observability created
configmap/config-registry-cert created
configmap/config-spire created
configmap/config-tracing created
deployment.apps/tekton-pipelines-controller created
service/tekton-pipelines-controller created
deployment.apps/tekton-events-controller created
service/tekton-events-controller created
namespace/tekton-pipelines-resolvers created
clusterrole.rbac.authorization.k8s.io/tekton-pipelines-resolvers-resolution-request-updates created
role.rbac.authorization.k8s.io/tekton-pipelines-resolvers-namespace-rbac created
serviceaccount/tekton-pipelines-resolvers created
clusterrolebinding.rbac.authorization.k8s.io/tekton-pipelines-resolvers created
rolebinding.rbac.authorization.k8s.io/tekton-pipelines-resolvers-namespace-rbac created
configmap/bundleresolver-config created
configmap/cluster-resolver-config created
configmap/resolvers-feature-flags created
configmap/config-leader-election-resolvers created
configmap/config-logging created
configmap/config-observability created
configmap/git-resolver-config created
configmap/http-resolver-config created
configmap/hubresolver-config created
deployment.apps/tekton-pipelines-remote-resolvers created
service/tekton-pipelines-remote-resolvers created
horizontalpodautoscaler.autoscaling/tekton-pipelines-webhook created
deployment.apps/tekton-pipelines-webhook created
service/tekton-pipelines-webhook created
查看 pod 资源
tekton-pipelines pod 资源
# kubectl get pods -n tekton-pipelines
NAME READY STATUS RESTARTS AGE
tekton-events-controller-5659db8c9b-8g5dq 1/1 Running 0 2m14s
tekton-pipelines-controller-6c6d9f758d-p8xvp 1/1 Running 0 2m14s
tekton-pipelines-webhook-7767648b4-gpsjc 1/1 Running 0 2m13s
tekton-pipelines-resolvers pod 资源
# kubectl get pods -n tekton-pipelines-resolvers
NAME READY STATUS RESTARTS AGE
tekton-pipelines-remote-resolvers-6c6f79b56d-v7srh 1/1 Running 0 2m57s
查看 svc 资源
# kubectl get svc -n tekton-pipelines
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
tekton-events-controller ClusterIP 10.100.147.243 <none> 9090/TCP,8008/TCP,8080/TCP 17m
tekton-pipelines-controller ClusterIP 10.100.136.156 <none> 9090/TCP,8008/TCP,8080/TCP 17m
tekton-pipelines-webhook ClusterIP 10.100.73.188 <none> 9090/TCP,8008/TCP,443/TCP,8080/TCP 17m
查看 tekton api resources
# kubectl api-resources |grep tekton
resolutionrequests resolutionrequest,resolutionrequests resolution.tekton.dev/v1beta1 true ResolutionRequest
clustertasks tekton.dev/v1beta1 false ClusterTask
customruns tekton.dev/v1beta1 true CustomRun
pipelineruns pr,prs tekton.dev/v1 true PipelineRun
pipelines tekton.dev/v1 true Pipeline
stepactions tekton.dev/v1alpha1 true StepAction
taskruns tr,trs tekton.dev/v1 true TaskRun
tasks tekton.dev/v1 true Task
verificationpolicies tekton.dev/v1alpha1 true VerificationPolicy
参考文档
https://tekton.dev/docs/installation/pipelines/