Debug School

Cover image for Install Tekton Pipelines
Suyash Sambhare
Suyash Sambhare

Posted on

Install Tekton Pipelines

Prerequisites

  • A Kubernetes cluster running version 1.24 or later.
  • Kubectl.
  • Grant cluster-admin privileges to the current user.
  • Install a Metrics Server if you need support for high-availability use cases.

Installation

To install Tekton Pipelines on OpenShift, you must first apply the anyuid security context constraint to the tekton-pipelines-controller service account. This is required to run the webhook Pod.

Log on as a user with cluster-admin privileges.
oc login -u system:admin

Set up the namespace (project) and configure the service account:
oc new-project tekton-pipelines
oc adm policy add-scc-to-user anyuid -z tekton-pipelines-controller
oc adm policy add-scc-to-user anyuid -z tekton-pipelines-webhook

Spikes

Install Tekton Pipelines
Because OpenShift uses a random user ID for pods, we need to remove the securityContext.runAsUser and securityContext.runAsGroup from any container from the release.yaml.
You will need to have yq installed for this to work. Another way would be to download the yaml, search and replace it in your favorite editor.

curl https://storage.googleapis.com/tekton-releases/pipeline/latest/release.notags.yaml | yq 'del(.spec.template.spec.containers[].securityContext.runAsUser, .spec.template.spec.containers[].securityContext.runAsGroup)' | oc apply -f -
Enter fullscreen mode Exit fullscreen mode

Monitor the installation using the following command until all components show a Running status:
oc get pods --namespace tekton-pipelines --watch

Congratulations! πŸ‘πŸ₯‡πŸŽΆπŸ“”
You have successfully installed Tekton Pipelines on your OpenShift environment.

Ref: https://tekton.dev/docs/installation/pipelines/

Top comments (0)