
Centralized CI servers with broad privileges create a high blast radius. When one service is compromised or vulnerable, all stored credentials and access can be exposed. Moving CI into the cluster reduces external credential sprawl and improves isolation.
- Separate infrastructure to manage: patching, scaling, and securing another server or cluster.
- Credential sprawl: the CI server stores cluster, registry, and environment secrets.
- Resource inefficiency: always-on static runners sit idle between builds.
- Limited Kubernetes integration: external CI cannot leverage Kubernetes RBAC, service accounts, pod-level resource limits, or pod security policies.

- Pods as runners: Kubernetes schedules and scales each task as a pod—no always-on VM required.
- Native RBAC: Use Kubernetes service accounts and Role/ClusterRole bindings to limit each pipeline’s privileges.
- Secret integration: Mount Kubernetes Secrets directly into pods; credentials remain inside the cluster.
- Declarative pipelines: Pipelines live as CRDs (Custom Resource Definitions). Store them in Git and manage them with GitOps.

- Tekton — modular, CI/CD-focused primitives (Tasks, Pipelines, TaskRuns, PipelineRuns, Workspaces).
- Argo Workflows — a general-purpose workflow engine (Workflows, Templates, DAGs, Artifacts).

- Task: A sequence of steps that execute in the same pod. Steps are containers that share the pod filesystem.
- Pipeline: A composition of Tasks with ordering/dependency semantics. Independent Tasks can run in parallel.
- TaskRun / PipelineRun: Execution instances of Tasks or Pipelines.
- Workspace: Shared storage (for example a PVC) mounted into Tasks for passing files and artifacts.

fetch-source, build-image, and test. runAfter enforces ordering so build-image and test run only after fetch-source completes; they may run in parallel after that point.
runAfter, Tekton will attempt to start tasks concurrently when dependencies are not defined.
Argo Workflows: DAG orchestration and artifact-driven steps
Argo Workflows is a general-purpose workflow engine suited to CI/CD, data pipelines, ML workflows, and other complex DAG-based orchestrations.
Key Argo concepts:
- Workflow: The top-level resource representing a run.
- Template: Reusable step definitions (container, script, DAG, or resource operation).
- DAG: Directed acyclic graph that defines dependencies between tasks.
- Artifacts: Files passed between steps; commonly stored in object stores like S3 or GCS.

build, test, and deploy. build and test run in parallel, while deploy depends on both.
dependencies in a DAG play the same role as Tekton’s runAfter—they express ordering constraints using different syntax.
Comparison: Tekton vs Argo Workflows
Both projects are Kubernetes-native and integrate well with GitOps practices, but they serve different primary use cases and have distinct execution models.

Choose Tekton when you want CI/CD primitives with shared-workspace efficiency and tight integration for builds/tests. Choose Argo Workflows when you need a general DAG engine for complex orchestration, strong isolation between steps, or advanced artifact handling.
- Limit privileges: Give pipelines the minimum service account permissions required.
- Use ephemeral pods: Prefer short-lived pods for build steps to reduce blast radius.
- Store pipeline definitions in Git: Keep CRDs/pipeline YAML under version control and deploy via GitOps.
- Secure artifact storage: Use encrypted object stores and restrict access to artifact repositories.
- Reuse tasks/templates: Publish common Tasks (Tekton) or Templates (Argo) to a hub/catalog to avoid duplication.
- Monitor and autoscale: Use Kubernetes metrics and HPA/Cluster Autoscaler to scale workers and storage.
- Tekton: https://tekton.dev/
- Argo Workflows: https://argoproj.github.io/argo-workflows/
- Argo CD: https://argo-cd.readthedocs.io/
- Kaniko (example image builder used with Tekton): https://github.com/GoogleContainerTools/kaniko
- Kubernetes RBAC concept: https://kubernetes.io/docs/reference/access-authn-authz/rbac/