VIDEO – What is Tekton?

4 min read

In this video, I'm going to provide an overview of the base concepts that underpin what a Tekton continuous integration or continuous delivery pipeline.

I'll also cover how you run Tekton inside a Kubernetes environment, how it helps you automate and deliver your software components, how developers would work with it on top on top of the Kubernetes platform.

If you enjoy this video, please make sure to subscribe to our YouTube channel for more like it.

Learn more

Video Transcript

What is Tekton?

Hi, my name's Matthew Perrins, I'm part of the IBM Cloud team, and today, I'm going to give you an introduction to Tekton.

What is Tekton?

So, what is Tekton? Tekton started life as part of the Knative Project as they were trying to solve specific problems around how they do continuous integration and continuous delivery of their software components, and it was later donated to the Continuous Delivery Foundation where we're now being able to use it and consume it across multiple Kubernetes environments and platforms.

So, what I want to do today is give you an overview of the base concepts that underpin what Tekton is, I want to explain about how you run it inside a Kubernetes environment and how it helps you automate and deliver your software components for running inside that platform. And then I want to give a brief explanation of how developers would consume it and work with it and how that separation of concerns may go forward.

Tekton components

Task

So, the base-level component of a Tekton continuous integration or delivery pipeline is something called a task. And a task is an automation task that you need to create that will help you build, test, deploy, manage, check the health of a particular piece of software.

Tekton Task

Once you create a number of tasks, you can actually isolate them and reuse them very easily, and Tekton—one of the real benefits is that it allows you to separate your tasks that are then consumed by your developers, and I'll explain that in a little bit more detail as we move forward.

Pipeline

So, once you've got a base element task you can create something called a pipeline. And a pipeline can be made up of any number of tasks, so you can customize that and tailor it for the specific software needs that you have.

Tekton Pipeline

Pipeline Run

Once you've defined a pipeline, you can trigger a pipeline from something called a Pipeline Run, and you create multiple runs in a software delivery project but it will continue to run the exact same definition of the pipeline that you defined with the exact same definition of the task that you define.

Pipeline Run

Pipeline Resource

Now one of the next pieces of key information to make this sequence run smoothly is you need to provide some data for that execution so that you can tailor and customize it. Anything from a build number to supplying a unique git repository or supplying a Docker image and this is called Pipeline Resource (Res).

Tekton Pipeline Resource

How a developer can use Tekton in the creation and delivery of projects

So, now that we've built these base components for a Tekton Pipeline, what we need to do is then start to think about how we prepare a developer to consume them. So, what you would typically do is you'd register your common tasks into your Kubernetes environment inside the Tekton Execution Engine that you will install inside Kubernetes.

So, what you would typically do is you'd register your common tasks into your Kubernetes environment inside the Tekton Execution Engine that you will install inside Kubernetes.

And those tasks can be commonly shared across different applications or different development teams. So, it allows a level of management and control that can be owned by the operations side of your DevOps organization.

Tekton and Kubernetes

So, Tekton itself runs inside the Kubernetes cluster and it associates very cleanly to a lot of the Kubernetes concepts like pods and services and CRC, YAML definitions.

So, once you've got your pipelines defined or the concepts about how you're going to use your pipelines, and once you've actually installed and got Tekton running inside your Kubernetes environment, what we need to do is then talk about how a developer would start using that in the creation and delivery of their projects.

Pipeline YAML

So, as I mentioned, you can have different Tekton pipeline definitions—and we'll call that pipeline YAML—and you can define that file inside your individual application. 

Pipeline YAML

And the relationship, if you remember, is that a pipeline can run any number of tasks, and these tasks have been already registered and defined inside the Tekton environment.

So, you can have task 1, task 2, task 3, and keep going.

So, you can have task 1, task 2, task 3, and keep going.

And within each task you can have a number of steps, and again, you can have any number of steps depending on the particular problem you're trying to solve.

Task steps.

Git push

So once you've defined your pipeline definition inside your application, then the developer can push their change to their Git Repository, and this will allow them to iterate multiple times on code changes or definition changes or feature and function improvements.

So once you've defined your pipeline definition inside your application, then the developer can push their change to their Git Repository, and this will allow them to iterate multiple times on code changes or definition changes or feature and function improvements.

And what happens is, this triggers a webhook which will then trigger a Tekton execution which will then marry the two elements together.

And what happens is, this triggers a webhook which will then trigger a Tekton execution which will then marry the two elements together

It will marry their pipeline definition that comes from the application, and it will take the tasks that you've defined inside your Tekton environment.

Delivery of app into namespaces

And this could result—and we hope it does—in successful delivery of your applications into specific namespaces, whether it be a dev, a test, or a pre-prod.

And this could result—and we hope it does—in successful delivery of your applications into specific namespaces, whether it be a dev, a test, or a pre-prod.

So, you've actually packaged up your code into a K8 image registry, and from there, you've now got a piece of packaged software that you can then roll out and deploy to other environments.

t13

So, I hope you enjoyed that walkthrough and you've got some information about the basic concepts of what Tekton is, how applications can use it, and how you run it on top of the Kubernetes platform.

Be the first to hear about news, product updates, and innovation from IBM Cloud