当前位置:网站首页>Cloud native cicd framework: Tekton
Cloud native cicd framework: Tekton
2022-07-02 16:31:00 【CSDN cloud computing】

author | AddoZhang
source | The cloud points north
Tekton yes Google Open source Kubernetes Native CI/CD System , Powerful function, strong expansibility . Formerly known as Knavite Inside build-pipeline project , Later, it hatches into an independent project . And become CDF One of the four projects under , The other three are Jenkins, Jenkins X, Spinnaker.
Why do you say Tekton yes Kubernetes Native , Because it is based on Kubernetes Of CRD Defined Pipeline Assembly line .
CRD And description :
Task: Build tasks , You can define some columns of steps. Every step By a container perform .
TaskRun: task Actual execution , And provide the parameters needed for execution . After this object is created , There will be pod Be created .
Pipeline: Define one or more task Implementation , as well as PipelineResource And various sets of defining parameters .
PipelineRun: similar task and taskrun The relationship between : One definition, one execution . PipelineRun It is pipeline The actual implementation of . After creation, it will also create pod To perform the various task.
PipelineResource: Pipeline input resources , such as github/gitlab Source code , Some kind of storage service file , Or mirror images, etc . Execution time , It will also serve as pod One of them container To run the ( Like pulling code ).
Condition: stay pipeline Of task Execute by adding condition To evaluate the conditions , And then judge whether to carry out task. At present, it is WIP The state of , stay #1137 Completion 、
Components :
tekton-pipelines-controller: monitor CRD object (TaskRun, PipelineRun) The creation of , Create... For this execution pod.tekton-pipelines-webhook: Yes apiserver Provide http Interface making CRD Object verification
install
kubectl apply --filename https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yamlCheck the installation tekton dependent CRD:
kubectl api-resources | grep tekton
clustertasks tekton.dev false ClusterTask
conditions tekton.dev true Condition
pipelineresources tekton.dev true PipelineResource
pipelineruns pr,prs tekton.dev true PipelineRun
pipelines tekton.dev true Pipeline
taskruns tr,trs tekton.dev true TaskRun
tasks tekton.dev true Tasktekton Of the two pod:
kubectl get pods --namespace tekton-pipelines
NAME READY STATUS RESTARTS AGE
tekton-pipelines-controller-556d8f4494-2qthv 1/1 Running 0 11m
tekton-pipelines-webhook-849cff5cf-8m5qq 1/1 Running 0 11minstall CLI
cli: https://github.com/tektoncd/cli#installing-tkn
brew install tektoncd-cliTekton: hello world
Create a simple Task, only one step Just print out ”hello world”
apiVersion: tekton.dev/v1alpha1
kind: Task
metadata:
name: echo-hello-world
spec:
steps:
- name: echo
image: alpine
command:
- echo
args:
- "hello world" Create a TaskRun Execute the above Task
apiVersion: tekton.dev/v1alpha1
kind: TaskRun
metadata:
name: echo-hello-world-task-run
spec:
taskRef:
name: echo-hello-worldfunction task:
kubectl apply -f <name-of-file.yaml> Check TaskRun Output , Carry out orders :
tkn taskrun describe echo-hello-world-task-runName: echo-hello-world-task-run
Namespace: tekton-pipelines
Task Ref: echo-hello-world
Status
STARTED DURATION STATUS
21 minutes ago 1 minute Succeeded
Input Resources
No resources
Output Resources
No resources
Params
No params
Steps
NAME STATUS
echo CompletedSucceeded State means task Successful implementation .
View actual output , Carry out orders :
tkn taskrun logs echo-hello-world-task-runresult :
[echo] hello world
Previous recommendation
read How much disk does a byte of file actually take place on IO?
Docker Why is the container proud ? All supported by mirror image !
Redis What to do when the memory is full ? This is the correct setting !
The original hand of cloud 、 Good hands and bad hands

Share

Point collection

A little bit of praise

Click to see
边栏推荐
- Song of cactus - throwing stones to ask the way (2)
- [5g NR] RRC connection release
- Best practices for building multi architecture images
- Song of cactus - throwing stones to ask the way (3)
- Dimension table and fact table in data warehouse
- 手机app通达信添加自定义公式(分时T+0)为例子讲解
- Original God 2.6 server download and installation tutorial
- Maui学习之路(三)--Winui3深入探讨
- PyC file decompile
- SSM integration exception handler and project exception handling scheme
猜你喜欢

Vscode设置标签页多行显示

Vscade set multi line display of tab

历史上的今天:支付宝推出条码支付;分时系统之父诞生;世界上第一支电视广告...

The login box of unity hub becomes too narrow to log in

一文读懂AGV的关键技术——激光SLAM与视觉SLAM的区别

触发器:Mysql实现一张表添加或删除一条数据,另一张表同时添加

电脑设备打印机驱动安装失败如何解决

Maui learning road (III) -- in depth discussion of winui3

Maui学习之路(三)--Winui3深入探讨

JS learning notes - data types
随机推荐
Classifier visual interpretation stylex: Google, MIT, etc. have found the key attributes that affect image classification
Practice of traffic recording and playback in vivo
分析超700万个研发需求发现,这8门编程语言才是行业最需要的!
做机器视觉哪个软件好?
[solution] educational codeforces round 82
mysql min() 求某条件下最小的值出现多个结果
Vscade set multi line display of tab
Yyds dry inventory company stipulates that all interfaces use post requests. Why?
JS learning notes - data types
一文读懂AGV的关键技术——激光SLAM与视觉SLAM的区别
Mathematical analysis_ Notes_ Chapter 6: Riemann integral of univariate function
OSPF - route aggregation [(summary) including configuration commands] | address summary calculation method - detailed explanation
Boot connection to impala database
The light of ideal never dies
By asp Net core downloads files according to the path exception
Recommended practice sharing of Zhilian recruitment based on Nebula graph
Yyds dry goods inventory student attendance system based on QT design
(practice C language every day) the sum of the nearest three numbers
Aujourd'hui dans l'histoire: Alipay lance le paiement par code à barres; La naissance du père du système de partage du temps; La première publicité télévisée au monde...
Typescript array out of order output