azure
koa
+
helm
+
+
+
+
gulp
+
+
http
+
npm
emacs
+
+
laravel
haskell
+
nomad
+
+
+
+
+
+
windows
+
โˆซ
rollup
+
helm
suse
rider
+
+
+
mysql
postgres
+
+
+
protobuf
+
gentoo
express
+
+
+
scala
+
+
+
+
+
+
+
+
+
gcp
astro
argocd
sqlite
+
+
+
+
+
mxnet
yarn
mysql
xgboost
+
xml
meteor
s3
+
+
+
couchdb
+
!=
+
+
+
+
+
+
Back to Blog
๐Ÿ”ง Tekton CI/CD Pipelines on AlmaLinux 9: Complete Guide
almalinux tekton ci-cd

๐Ÿ”ง Tekton CI/CD Pipelines on AlmaLinux 9: Complete Guide

Published Sep 6, 2025

Build cloud-native CI/CD with Tekton on AlmaLinux 9! Learn pipeline creation, task automation, triggers, and Kubernetes-native continuous delivery with practical examples.

5 min read
0 views
Table of Contents

๐Ÿ”ง Tekton CI/CD Pipelines on AlmaLinux 9: Complete Guide

Ready to revolutionize your CI/CD with Kubernetes-native pipelines? ๐Ÿš€ Today weโ€™ll deploy Tekton on AlmaLinux 9, creating powerful, scalable pipelines that run as Kubernetes resources! Letโ€™s build amazing automation! โœจ๐ŸŽฏ

๐Ÿค” Why is Tekton Important?

Imagine CI/CD that scales infinitely with Kubernetes! ๐ŸŒŸ Thatโ€™s Tektonโ€™s superpower! Hereโ€™s why itโ€™s revolutionary:

  • ๐ŸŽฏ Kubernetes Native - Pipelines are first-class Kubernetes resources!
  • ๐Ÿ“ฆ Reusable Components - Share tasks across teams and projects
  • ๐Ÿš€ Infinite Scalability - Scale by adding Kubernetes nodes
  • ๐Ÿ”„ Event-Driven - Trigger pipelines from any event source
  • ๐Ÿ› ๏ธ Container-Based - Each step runs in its own container
  • ๐Ÿ“Š Built-in Observability - Monitor everything with Kubernetes tools
  • ๐ŸŒ Cloud Agnostic - Run anywhere Kubernetes runs
  • ๐Ÿ’ก Declarative YAML - Define pipelines as code

๐ŸŽฏ What You Need

Before we build amazing pipelines, gather these:

  • โœ… AlmaLinux 9 server (4GB RAM minimum, 8GB recommended)
  • โœ… Kubernetes cluster 1.24+ (K3s, K8s, or any flavor)
  • โœ… kubectl configured and working
  • โœ… Git repository for pipeline code
  • โœ… Container registry access (Docker Hub, Quay, etc.)
  • โœ… Basic Kubernetes knowledge
  • โœ… Root or sudo access
  • โœ… Ready for pipeline magic! ๐ŸŽ‰

๐Ÿ“ Step 1: Prepare AlmaLinux Environment

Letโ€™s prepare your system for Tekton! ๐Ÿ› ๏ธ

Install Prerequisites

# Update system packages
sudo dnf update -y  # Keep everything current

# Install essential tools
sudo dnf install -y git curl wget jq

# Verify Kubernetes cluster
kubectl get nodes  # All should be Ready
kubectl version --short  # Check version 1.24+

# Create tekton namespaces
kubectl create namespace tekton-pipelines
kubectl create namespace tekton-pipelines-resolvers

# Check available resources
kubectl top nodes  # Ensure sufficient resources

Install Tekton CLI

# Download latest Tekton CLI (tkn)
TKN_VERSION="0.33.0"  # Check for latest at github.com/tektoncd/cli
curl -LO https://github.com/tektoncd/cli/releases/download/v${TKN_VERSION}/tkn_${TKN_VERSION}_Linux_x86_64.tar.gz

# Extract and install
tar xvzf tkn_${TKN_VERSION}_Linux_x86_64.tar.gz
sudo mv tkn /usr/local/bin/
sudo chmod +x /usr/local/bin/tkn

# Verify installation
tkn version  # Shows CLI version

# Enable bash completion
tkn completion bash | sudo tee /etc/bash_completion.d/tkn > /dev/null
source /etc/bash_completion.d/tkn

๐Ÿ”ง Step 2: Install Tekton Pipelines

Time to deploy Tektonโ€™s core components! ๐ŸŽŠ

# Install Tekton Operator
kubectl apply -f https://storage.googleapis.com/tekton-releases/operator/latest/release.yaml

# Wait for operator to be ready
kubectl wait --for=condition=Ready pods -n tekton-operator --all --timeout=300s

# Create TektonConfig for complete installation
cat <<EOF | kubectl apply -f -
apiVersion: operator.tekton.dev/v1alpha1
kind: TektonConfig
metadata:
  name: config
spec:
  profile: all  # Installs all components
  targetNamespace: tekton-pipelines
  pipeline:
    enable-api-fields: beta
    enable-custom-tasks: true
  trigger:
    enable-api-fields: beta
  dashboard:
    readonly: false
EOF

# Verify installation
kubectl get tektonconfig config
kubectl get pods -n tekton-pipelines  # All should be Running

Method 2: Direct Installation

# Install Tekton Pipelines
kubectl apply --filename https://storage.googleapis.com/tekton-releases/pipeline/latest/release.yaml

# Install Tekton Triggers
kubectl apply --filename https://storage.googleapis.com/tekton-releases/triggers/latest/release.yaml

# Install Tekton Dashboard
kubectl apply --filename https://storage.googleapis.com/tekton-releases/dashboard/latest/release.yaml

# Monitor installation
kubectl get pods -n tekton-pipelines -w  # Ctrl+C when all Running

# Verify components
tkn version  # Shows all component versions

๐ŸŒŸ Step 3: Create Your First Pipeline

Letโ€™s build an amazing CI/CD pipeline! ๐Ÿš€

Create a Simple Task

# Create a Hello World task
cat <<EOF | kubectl apply -f -
apiVersion: tekton.dev/v1
kind: Task
metadata:
  name: hello-world
  namespace: default
spec:
  params:
    - name: greeting
      type: string
      default: "Hello"
    - name: name
      type: string
      default: "World"
  steps:
    - name: say-hello
      image: alpine
      command:
        - echo
      args:
        - "\$(params.greeting), \$(params.name)! ๐ŸŽ‰"
    - name: show-date
      image: alpine
      script: |
        #!/bin/sh
        echo "Current date: \$(date)"
        echo "Running on AlmaLinux Kubernetes! ๐Ÿš€"
EOF

# Run the task
tkn task start hello-world \
  --param greeting="Welcome" \
  --param name="Tekton User" \
  --showlog

# You'll see the output immediately!

Create a Build Pipeline

# Create a pipeline for building applications
cat <<EOF | kubectl apply -f -
apiVersion: tekton.dev/v1
kind: Pipeline
metadata:
  name: build-and-deploy
  namespace: default
spec:
  params:
    - name: git-url
      type: string
      description: Git repository URL
    - name: git-revision
      type: string
      default: main
    - name: image-name
      type: string
      description: Docker image name
  workspaces:
    - name: shared-workspace
    - name: docker-credentials
  tasks:
    # Clone source code
    - name: clone-source
      taskRef:
        name: git-clone
        kind: ClusterTask
      params:
        - name: url
          value: \$(params.git-url)
        - name: revision
          value: \$(params.git-revision)
      workspaces:
        - name: output
          workspace: shared-workspace
          
    # Run tests
    - name: run-tests
      runAfter: [clone-source]
      taskRef:
        name: npm-test
      workspaces:
        - name: source
          workspace: shared-workspace
          
    # Build container image
    - name: build-image
      runAfter: [run-tests]
      taskRef:
        name: buildah
        kind: ClusterTask
      params:
        - name: IMAGE
          value: \$(params.image-name)
      workspaces:
        - name: source
          workspace: shared-workspace
        - name: dockerconfig
          workspace: docker-credentials
          
    # Deploy to Kubernetes
    - name: deploy
      runAfter: [build-image]
      taskRef:
        name: kubernetes-actions
      params:
        - name: script
          value: |
            kubectl set image deployment/myapp myapp=\$(params.image-name)
            kubectl rollout status deployment/myapp
EOF

# Install required ClusterTasks from Tekton Hub
tkn hub install task git-clone
tkn hub install task buildah
tkn hub install task kubernetes-actions

โœ… Step 4: Set Up Triggers

Letโ€™s automate pipeline execution with triggers! ๐ŸŽฏ

Create EventListener

# Create trigger binding
cat <<EOF | kubectl apply -f -
apiVersion: triggers.tekton.dev/v1beta1
kind: TriggerBinding
metadata:
  name: github-push-binding
  namespace: default
spec:
  params:
    - name: git-url
      value: \$(body.repository.clone_url)
    - name: git-revision
      value: \$(body.after)
    - name: git-repo-name
      value: \$(body.repository.name)
EOF

# Create trigger template
cat <<EOF | kubectl apply -f -
apiVersion: triggers.tekton.dev/v1beta1
kind: TriggerTemplate
metadata:
  name: github-push-template
  namespace: default
spec:
  params:
    - name: git-url
    - name: git-revision
    - name: git-repo-name
  resourcetemplates:
    - apiVersion: tekton.dev/v1
      kind: PipelineRun
      metadata:
        generateName: \$(tt.params.git-repo-name)-run-
      spec:
        pipelineRef:
          name: build-and-deploy
        params:
          - name: git-url
            value: \$(tt.params.git-url)
          - name: git-revision
            value: \$(tt.params.git-revision)
          - name: image-name
            value: "myregistry.io/\$(tt.params.git-repo-name):latest"
        workspaces:
          - name: shared-workspace
            volumeClaimTemplate:
              spec:
                accessModes:
                  - ReadWriteOnce
                resources:
                  requests:
                    storage: 1Gi
          - name: docker-credentials
            secret:
              secretName: docker-credentials
EOF

# Create EventListener
cat <<EOF | kubectl apply -f -
apiVersion: triggers.tekton.dev/v1beta1
kind: EventListener
metadata:
  name: github-listener
  namespace: default
spec:
  serviceAccountName: tekton-triggers-sa
  triggers:
    - name: github-push
      bindings:
        - ref: github-push-binding
      template:
        ref: github-push-template
EOF

# Expose EventListener
kubectl port-forward service/el-github-listener 8080:8080 &
echo "Webhook URL: http://localhost:8080"

๐ŸŽฎ Quick Examples

Letโ€™s explore Tektonโ€™s powerful features! ๐ŸŽฌ

Example 1: Parallel Task Execution

# Create pipeline with parallel tasks
cat <<EOF | kubectl apply -f -
apiVersion: tekton.dev/v1
kind: Pipeline
metadata:
  name: parallel-pipeline
spec:
  tasks:
    - name: task-1
      taskSpec:
        steps:
          - image: alpine
            script: |
              echo "Task 1 running! ๐Ÿƒ"
              sleep 5
              echo "Task 1 done! โœ…"
    - name: task-2
      taskSpec:
        steps:
          - image: alpine
            script: |
              echo "Task 2 running! ๐Ÿƒ"
              sleep 3
              echo "Task 2 done! โœ…"
    - name: task-3
      taskSpec:
        steps:
          - image: alpine
            script: |
              echo "Task 3 running! ๐Ÿƒ"
              sleep 4
              echo "Task 3 done! โœ…"
    - name: final-task
      runAfter: [task-1, task-2, task-3]
      taskSpec:
        steps:
          - image: alpine
            script: echo "All parallel tasks completed! ๐ŸŽ‰"
EOF

# Run the pipeline
tkn pipeline start parallel-pipeline --showlog

Example 2: Using Workspaces

# Create pipeline with workspace sharing
cat <<EOF | kubectl apply -f -
apiVersion: tekton.dev/v1
kind: Pipeline
metadata:
  name: workspace-pipeline
spec:
  workspaces:
    - name: pipeline-ws
  tasks:
    - name: create-file
      workspaces:
        - name: output
          workspace: pipeline-ws
      taskSpec:
        workspaces:
          - name: output
        steps:
          - image: alpine
            script: |
              echo "Hello from Tekton! ๐Ÿš€" > \$(workspaces.output.path)/message.txt
              echo "File created successfully!"
    - name: read-file
      runAfter: [create-file]
      workspaces:
        - name: input
          workspace: pipeline-ws
      taskSpec:
        workspaces:
          - name: input
        steps:
          - image: alpine
            script: |
              echo "Reading file content:"
              cat \$(workspaces.input.path)/message.txt
EOF

# Run with PVC
tkn pipeline start workspace-pipeline \
  --workspace name=pipeline-ws,claimName=tekton-pvc \
  --showlog

Example 3: Tekton Dashboard

# Access Tekton Dashboard
kubectl port-forward -n tekton-pipelines service/tekton-dashboard 9097:9097 &

echo "๐ŸŽจ Dashboard available at: http://localhost:9097"
# Browse to see all pipelines, tasks, and runs!

# Or use tkn to view resources
tkn pipeline list
tkn pipelinerun list
tkn taskrun list

๐Ÿšจ Fix Common Problems

Donโ€™t worry, weโ€™ve got solutions! ๐Ÿ’ช

Problem 1: Pipeline Fails to Start

# Check for RBAC issues
kubectl create serviceaccount pipeline-sa
kubectl create rolebinding pipeline-rb \
  --clusterrole=edit \
  --serviceaccount=default:pipeline-sa

# Use service account in PipelineRun
tkn pipeline start build-and-deploy \
  --serviceaccount=pipeline-sa \
  --showlog

# Check resource limits
kubectl describe limitrange -n default
kubectl describe resourcequota -n default

Problem 2: Task Not Found

# List available tasks
tkn task list
tkn clustertask list

# Install from Tekton Hub
tkn hub search git
tkn hub install task git-clone --version 0.9

# Create task if missing
kubectl apply -f https://raw.githubusercontent.com/tektoncd/catalog/main/task/git-clone/0.9/git-clone.yaml

Problem 3: Workspace Issues

# Create PVC for workspace
cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: tekton-workspace
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 5Gi
EOF

# Use emptyDir for testing
tkn pipeline start my-pipeline \
  --workspace name=shared-workspace,emptyDir="" \
  --showlog

๐Ÿ“‹ Simple Commands Summary

Your Tekton command toolkit! ๐Ÿ“š

CommandWhat It DoesWhen to Use
kubectl apply -f tekton-release.yamlInstall TektonInitial setup
tkn pipeline start <name>Run pipelineExecute pipeline
tkn pipeline listList pipelinesView pipelines
tkn pipelinerun logs <name>View logsDebug runs
tkn task start <name>Run single taskTest tasks
tkn hub searchSearch Tekton HubFind tasks
tkn hub install task <name>Install from HubAdd tasks
tkn pipeline describe <name>Show pipeline detailsUnderstand flow
tkn pipelinerun cancel <name>Cancel running pipelineStop execution
kubectl get pods -n tekton-pipelinesCheck Tekton podsVerify health

๐Ÿ’ก Tips for Success

Master Tekton with these pro tips! ๐Ÿ†

Pipeline Design

  • ๐Ÿ“ฆ Keep tasks small and reusable
  • ๐Ÿ”„ Use workspaces for data sharing
  • ๐ŸŽฏ Leverage Tekton Hub tasks
  • ๐Ÿ“Š Add resource limits to tasks
  • ๐Ÿ” Use secrets for credentials

Performance Optimization

  • โšก Run independent tasks in parallel
  • ๐Ÿ’พ Cache dependencies in images
  • ๐Ÿš€ Use persistent workspaces wisely
  • ๐Ÿ“ˆ Monitor resource usage
  • ๐ŸŽฏ Optimize container images

Best Practices

  • ๐Ÿ“ Version your pipeline definitions
  • ๐Ÿ›ก๏ธ Implement proper RBAC
  • ๐Ÿ” Add comprehensive logging
  • โš ๏ธ Set up monitoring and alerts
  • ๐Ÿ”„ Use GitOps for pipeline management
  • ๐Ÿ“Š Track metrics with Prometheus
  • ๐ŸŽจ Organize with namespaces

๐Ÿ† What You Learned

Fantastic work! Youโ€™re now a Tekton expert! ๐ŸŽ‰ You can:

  • โœ… Install Tekton on AlmaLinux 9 Kubernetes
  • โœ… Create tasks and pipelines
  • โœ… Set up event-driven triggers
  • โœ… Use workspaces for data sharing
  • โœ… Run parallel task execution
  • โœ… Access Tekton Dashboard
  • โœ… Troubleshoot common issues
  • โœ… Build production CI/CD pipelines

๐ŸŽฏ Why This Matters

Youโ€™ve built cloud-native CI/CD at its finest! ๐Ÿš€ With Tekton:

  • Infinite Scale - Add nodes to scale pipelines
  • True Kubernetes Native - Pipelines as K8s resources
  • Reusable Components - Share tasks across teams
  • Event-Driven - Automate everything with triggers
  • Cloud Agnostic - Run anywhere Kubernetes runs
  • GitOps Ready - Manage pipelines as code
  • Cost Efficient - Pay only for what you use

Your CI/CD is now as scalable and resilient as your applications! No more Jenkins servers to maintain, no more pipeline bottlenecks. Everything runs as Kubernetes workloads!

Keep exploring advanced features like custom tasks, pipeline metrics, and integration with other tools. Youโ€™re running modern CI/CD! ๐ŸŒŸ

Remember: Great software deserves great pipelines - Tekton delivers both! Happy building! ๐ŸŽŠ๐Ÿ”ง


P.S. - Join the Tekton community, contribute to Tekton Hub, and share your pipeline creations! The future of CI/CD is cloud-native! โญ๐Ÿ™Œ