当前位置:网站首页>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
边栏推荐
- Vscade set multi line display of tab
- Analyzing more than 7million R & D needs, it is found that these eight programming languages are the most needed in the industry!
- Student course selection system (curriculum design of Shandong Agricultural University)
- 结构体的内存对齐
- 请问怎么在oracle视图中使用stustr函数
- day4
- Bib | graph representation based on heterogeneous information network learning to predict drug disease association
- sql解决连续登录问题变形-节假日过滤
- [fluent] dart data type string type (string definition | string splicing | string API call)
- SQLServer查询哪些索引利用率低
猜你喜欢
Mobile web development learning notes - Layout
OSPF - route aggregation [(summary) including configuration commands] | address summary calculation method - detailed explanation
Seal Library - installation and introduction
Routing mode: hash and history mode
Summary of multithreading and thread synchronization knowledge
The login box of unity hub becomes too narrow to log in
Understand the key technology of AGV -- the difference between laser slam and visual slam
Huawei ECS installs mysqlb for mysqld service failed because the control process exited with error code. See “sys
Maui学习之路(三)--Winui3深入探讨
一文读懂AGV的关键技术——激光SLAM与视觉SLAM的区别
随机推荐
自注意力机制和全连接的图卷积网络(GCN)有什么区别联系?
Bib | graph representation based on heterogeneous information network learning to predict drug disease association
Some problems about MySQL installation
解决** WARNING ** : Your ApplicationContext is unlikely to start due to a @ComponentScan of the defau
Original God 2.6 server download and installation tutorial
[Xiaobai chat cloud] suggestions on container transformation of small and medium-sized enterprises
618深度复盘:海尔智家的制胜方法论
Idea jar package conflict troubleshooting
sql解决连续登录问题变形-节假日过滤
Mobile web development learning notes - Layout
IDEA中设置背景图片(超详细)
Route service grid traffic through two-level gateway design
Remove the underline in router link
Yyds dry goods inventory hands-on teaching you to carry out the packaging and release of mofish Library (fishing Library)
Idea public method extraction shortcut key
PCL 点云镜像变换
数据安全产业系列沙龙(三)| 数据安全产业标准体系建设主题沙龙
Processing gzip: stdin: not in gzip format: child returned status 1tar: error is not recoverable: exitin
总结|机器视觉中三大坐标系及其相互关系
Conditions and solutions of deadlock