Use Tekton and OpenShift operators to automate application deployment


Tekton is an open source project that provides a Kubernetes-native way to declare continuous integration/continuous deployment-style pipelines. In this code pattern, we show you how we used Tekton to reduce application deployment time from 45 minutes of clicking around and configuring down to 15 minutes and a few commands. We speed up the installation of Tekton itself by means of the Red Hat OpenShift Pipelines Operator that is available from the OperaterHub in clusters of version 4.1 and greater.


To demonstrate the functionality of Tekton, we need an example application to deploy. Example Health is a sample app we created to demonstrate application modernization. As often is the case in production applications, Example Health started out as two separate applications. When our business needs grew faster than we anticipated, we quickly added analytic capabilities to our application.

In the vein of 12-factor application best practices, we split our workload into five microservices. This translates into the Example Health application consisting of five different images. Currently, we have all five of these services deployed into one Red Hat® OpenShift® on IBM Cloud™ cluster.


Architecture flow diagram for code pattern

  1. User creates an OpenShift cluster.
  2. User subscribes to the OpenShift Pipelines Operator via the OperatorHub.
  3. Retrieve Pipelines installer image from the Red Hat Ecosystem Catalog.
  4. Install Tekton Pipelines, Triggers, and ClusterTasks.
  5. Execute pipeline and build, deploy, and expose Example Health images.
  6. Confirm functionality of resources.


Ready to get started? Check out the README for detailed instructions on how to:

  1. Target your cluster.
  2. Install Tekton
  3. Create a service account.
  4. Install tasks.
  5. Apply resources, pipeline, and run.