当前位置:网站首页>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.yaml
Check 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 Task
tekton 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 11m
install CLI
cli: https://github.com/tektoncd/cli#installing-tkn
brew install tektoncd-cli
Tekton: 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-world
function task:
kubectl apply -f <name-of-file.yaml>
Check TaskRun
Output , Carry out orders :
tkn taskrun describe echo-hello-world-task-run
Name: 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 Completed
Succeeded
State means task Successful implementation .
View actual output , Carry out orders :
tkn taskrun logs echo-hello-world-task-run
result :
[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
边栏推荐
- 华为云服务器安装mysqlb for mysqld.service failed because the control process exited with error code.See “sys
- AWS virtual machine expansion
- HMS core machine learning service helps zaful users to shop conveniently
- Set the background picture in the idea (ultra detailed)
- Yyds dry goods inventory student attendance system based on QT design
- SQL solves the problem of continuous login deformation holiday filtering
- False summer vacation
- Introduction to database system Chapter 1 short answer questions - how was the final exam?
- mysql min() 求某条件下最小的值出现多个结果
- 做机器视觉哪个软件好?
猜你喜欢
Typescript array out of order output
Compress words (kmp/ string hash, double hash)
Practice of traffic recording and playback in vivo
End time processing method of wechat v3native payment settings
Win11应用商店无法加载页面怎么办?Win11商店无法加载页面
JS learning notes - operators
Summary | three coordinate systems in machine vision and their relationships
Text intelligent expansion and contraction control of swiftui text component (tutorial includes source code)
Unity使用UGUI设置一个简单多级水平方向下拉菜单(不需要代码)
Route service grid traffic through two-level gateway design
随机推荐
Yyds dry goods inventory hands-on teaching you to carry out the packaging and release of mofish Library (fishing Library)
sql解决连续登录问题变形-节假日过滤
Mysql database mysqldump why there is no statement to create a database
Typescript array out of order output
After the win10 system is upgraded for a period of time, the memory occupation is too high
Seal Library - installation and introduction
去除router-link中的下划线
IDEA中设置背景图片(超详细)
Yyds dry goods inventory has not revealed the artifact? Valentine's Day is coming. Please send her a special gift~
618深度复盘:海尔智家的制胜方法论
Pandora IOT development board learning (RT thread) - Experiment 2 RGB LED experiment (learning notes)
Written by unity Jason
How to use stustr function in Oracle view
618 deep resumption: Haier Zhijia's winning methodology
Unity Json 编写
[fluent] dart data type number type (DART file creation | num type | int type | double type | num related API)
Summary | three coordinate systems in machine vision and their relationships
手机app通达信添加自定义公式(分时T+0)为例子讲解
Original God 2.6 server download and installation tutorial
处理gzip: stdin: not in gzip formattar: Child returned status 1tar: Error is not recoverable: exitin