From the course: Automating Kubernetes with GitOps

Unlock this course with a free trial

Join today to access over 24,700 courses taught by industry experts.

Running Tekton tasks

Running Tekton tasks

- In this video, I'll show you how to run Tekton tasks. So a task defines the steps which are executed by a Pod, and each step runs a container with a specific command in that Pod. And the TaskRun is what you are going to need to run a task. Let me show you. So let me first show you the content of demotask.yaml, where we can see that we have a task with the name demotask with two steps, stepone and steptwo. Each of these steps runs a container. So, they are both running container alpine, and it's a very simple command that they're running, hello step one and hello step two. So kubectl apply -f on demotask.yaml is going to apply it. Now, if I'm using kubectl get pods and tasks, then we see demotask, but we don't see the corresponding pod. So, what are we going to do about it? Well, we need a demotask-run. So let's have a look at demotask-run.yaml. You can see this is very simple. It has just demotask-run and it refers to the task. So I'm using kubectl apply -f demotask-run to create…

Contents