Kokil Thapa - Professional Web Developer in Nepal
Freelancer Web Developer in Nepal with 15+ Years of Experience

Kokil Thapa is an experienced full-stack web developer focused on building fast, secure, and scalable web applications. He helps businesses and individuals create SEO-friendly, user-focused digital platforms designed for long-term growth.

Argo Workflows for CI Pipelines

By Kokil Thapa | Last reviewed: September 2026

Teams outgrow single-server CI when builds compete for CPU, deploy targets multiply, and you already run workloads on Kubernetes. Argo Workflows for CI Pipelines gives you a container-native orchestrator: each lint, test, and build step runs in its own pod, chained as a directed acyclic graph (DAG). If you maintain Laravel CI with GitLab CI today but want runners colocated with staging clusters, Argo Workflows is a credible next step—not a drop-in replacement, but a strong fit when Kubernetes is already part of your stack.

What is Argo Workflows and why use it for CI pipelines?

Argo Workflows is a CNCF-graduated workflow engine for Kubernetes. It extends the API with Custom Resources such as Workflow, WorkflowTemplate, and CronWorkflow. Each step is a container spec the controller schedules like any other pod.

That model differs from a traditional CI server. Jenkins and GitLab Runner keep long-lived agents. Argo spins up ephemeral pods, runs one step, then tears them down. You pay only for compute during the job. On a busy monorepo, that isolation also stops a flaky integration test from starving unrelated builds.

In practice, Argo Workflows shines when:

  • Kubernetes already hosts your apps, so CI pods land near the cluster they deploy to.
  • You need DAG parallelism—lint and unit tests in parallel, then integration tests, then image build.
  • You want one orchestrator for CI, data pipelines, and batch jobs instead of three tools.
  • Your team accepts YAML-first pipelines and kubectl-level debugging.

It is a weaker default when your team has no cluster ops capacity. A managed GitLab CI or GitHub Actions setup is simpler if Kubernetes is not in your roadmap. For teams shipping custom software on Kubernetes, the trade-off often tilts toward Argo.

Argo Workflows CI ArchitectureGit PushGitLab / GitHubArgo EventsWebhook sensorWorkflow CRDDAG definitionWorkflow ControllerSchedules pod stepsLint Podphp-cs-fixerTest PodphpunitBuild Poddocker buildDeploy Podkubectl apply
Argo Workflows for CI pipelines: Git events create Workflow CRDs that the controller executes as ephemeral Kubernetes pods.

How do you install Argo Workflows on a Kubernetes cluster?

Install Argo Workflows into a dedicated namespace—argo is the usual choice. The official manifest bundle pins a controller version; check the Argo Workflows installation docs for the current release before you apply YAML in production.

Quick install with kubectl

# Create namespace
kubectl create namespace argo

# Install Argo Workflows (check docs for latest version tag)
kubectl apply -n argo -f https://github.com/argoproj/argo-workflows/releases/download/v3.6.2/install.yaml

# Install Argo CLI (Linux amd64 example)
curl -sLO https://github.com/argoproj/argo-workflows/releases/download/v3.6.2/argo-linux-amd64.gz
gunzip argo-linux-amd64.gz
chmod +x argo-linux-amd64
sudo mv argo-linux-amd64 /usr/local/bin/argo

After install, patch the workflow controller ConfigMap if you need artifact storage. The default config uses the in-cluster argo-server artifact repository, which is fine for experiments but not for production CI artifacts.

Configure artifact storage for CI outputs

CI pipelines produce test reports, coverage files, and built images. Argo Workflows supports S3-compatible storage, GCS, Azure Blob, and Artifactory. For AWS or MinIO:

apiVersion: v1
kind: ConfigMap
metadata:
  name: workflow-controller-configmap
  namespace: argo
data:
  artifactRepository: |
    s3:
      bucket: my-ci-artifacts
      endpoint: s3.amazonaws.com
      region: ap-south-1
      accessKeySecret:
        name: my-s3-credentials
        key: accessKey
      secretKeySecret:
        name: my-s3-credentials
        key: secretKey

Reload the controller after editing the ConfigMap. Without durable artifact storage, later DAG steps cannot consume outputs from earlier steps running in different pods.

If your team manages the cluster in-house, Linux and Kubernetes administration skills matter as much as the YAML itself. Misconfigured RBAC is the most common first-week blocker.

How do you write an Argo Workflow for a CI pipeline?

A CI Workflow is a YAML file with a spec.templates array and an entrypoint. Templates can be container, script, resource, or dag. For CI, you will use dag templates most often.

Example: Laravel PHP 8.3 CI pipeline

This example mirrors a typical database migration CI check plus test and build stages. It assumes a private registry and a Composer cache volume.

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: laravel-ci-
  namespace: argo
spec:
  entrypoint: ci-pipeline
  serviceAccountName: argo-workflow
  arguments:
    parameters:
      - name: git-revision
        value: main
      - name: repo-url
        value: https://github.com/myorg/myapp.git

  templates:
    - name: ci-pipeline
      dag:
        tasks:
          - name: checkout
            template: git-clone
          - name: composer-install
            dependencies: [checkout]
            template: composer
          - name: lint
            dependencies: [composer-install]
            template: php-lint
          - name: test
            dependencies: [composer-install]
            template: phpunit
          - name: build-image
            dependencies: [lint, test]
            template: kaniko-build

    - name: git-clone
      container:
        image: alpine/git:latest
        command: [sh, -c]
        args:
          - git clone --depth 1 --branch {{workflow.parameters.git-revision}}
            {{workflow.parameters.repo-url}} /workspace/src
        volumeMounts:
          - name: workspace
            mountPath: /workspace

    - name: composer
      container:
        image: composer:2.10
        command: [sh, -c]
        args:
          - cd /workspace/src && composer install --no-interaction --prefer-dist
        volumeMounts:
          - name: workspace
            mountPath: /workspace

    - name: php-lint
      container:
        image: php:8.3-cli
        command: [sh, -c]
        args:
          - cd /workspace/src && vendor/bin/pint --test
        volumeMounts:
          - name: workspace
            mountPath: /workspace

    - name: phpunit
      container:
        image: php:8.3-cli
        env:
          - name: DB_CONNECTION
            value: sqlite
          - name: DB_DATABASE
            value: ":memory:"
        command: [sh, -c]
        args:
          - cd /workspace/src && cp .env.testing .env && php artisan test
        volumeMounts:
          - name: workspace
            mountPath: /workspace

    - name: kaniko-build
      container:
        image: gcr.io/kaniko-project/executor:latest
        args:
          - --dockerfile=/workspace/src/Dockerfile
          - --context=/workspace/src
          - --destination=registry.example.com/myapp:{{workflow.uid}}
        volumeMounts:
          - name: workspace
            mountPath: /workspace

  volumeClaimTemplates:
    - metadata:
        name: workspace
      spec:
        accessModes: ["ReadWriteOnce"]
        resources:
          requests:
            storage: 2Gi

Submit the Workflow:

argo submit -n argo laravel-ci-workflow.yaml --watch
argo logs -n argo @latest

Promote this to a reusable WorkflowTemplate once the DAG stabilises. Templates accept parameters for branch name, PHP version, and deploy target. That pattern matches how I structure pipeline automation best practices on GitLab—one template, many parameterised runs.

CI Pipeline DAG Steps1. Git Clone2. Composer Install3a. Lint3b. Test4. Build Image5. Deploy Staging
Typical Argo Workflows CI DAG: parallel lint and test gates block the image build and deploy stages.

How does Argo Workflows compare to Tekton and GitLab CI for CI pipelines?

Pick the tool that matches where your code runs today—not the one with the most GitHub stars. All three can lint, test, and deploy a Laravel 13 app on PHP 8.3. The operational model differs.

CriteriaArgo WorkflowsTektonGitLab CI
Primary abstractionWorkflow CRD with DAG templatesPipeline / Task / PipelineRun CRDs.gitlab-ci.yml jobs and stages
Runner modelKubernetes pods per stepKubernetes pods per taskShell executor, Docker, or K8s executor
Best fitTeams already on Argo CD / EventsPure K8s-native CI with Chains signingGitLab-centric teams, minimal K8s ops
ParallelismNative DAG with dependenciesrunAfter task orderingneeds keyword in jobs
SecretsK8s Secrets + external vaultsK8s Secrets, Vault, SPIREGitLab CI variables, masked/protected
Learning curveModerate—CRD YAML + kubectlModerate—more CRD typesLower—single YAML in repo root
Non-K8s workloadsWeak—everything is a podWeak—same constraintStrong—VM runners, shared hosting

Argo Workflows and Tekton overlap heavily. Tekton integrates cleanly with OpenShift and supply-chain signing via Chains. Argo Workflows pairs naturally with Argo Rollouts and Argo CD in a single Argo ecosystem. GitLab CI remains my default for client projects on shared EC2 with Deployer 7—it needs no cluster.

For a greenfield platform team running multiple microservices on Kubernetes, Argo Workflows reduces tool sprawl. For a law-firm portal on a single VPS, it adds complexity you do not need.

How do you trigger and secure Argo Workflows CI pipelines?

Manual argo submit works for testing. Production CI needs event-driven triggers and tight secret handling.

Trigger from Git with Argo Events

Argo Events watches webhooks from GitHub or GitLab. A Sensor resource maps the payload to a Workflow submission:

  1. Install Argo Events in the same cluster.
  2. Create an EventSource with a Git webhook endpoint.
  3. Define a Sensor that submits your WorkflowTemplate on push to main.
  4. Expose the webhook through an Ingress with TLS.
  5. Validate webhook signatures before the Sensor fires.

Filter by path if you run a monorepo. Only rebuild the API service when services/api/** changes. That saves cluster CPU and keeps queue times predictable.

Secrets and RBAC

Never embed registry passwords or API keys in Workflow YAML. Mount Kubernetes Secrets as env vars or files. For production, integrate HashiCorp Vault or your cloud provider's secret manager—the same principles as handling secrets in CI/CD pipelines safely apply here.

    - name: deploy-staging
      container:
        image: bitnami/kubectl:latest
        env:
          - name: KUBECONFIG
            value: /secrets/kubeconfig
        volumeMounts:
          - name: kubeconfig-secret
            mountPath: /secrets
            readOnly: true
      volumes:
        - name: kubeconfig-secret
          secret:
            secretName: staging-kubeconfig

Create a dedicated ServiceAccount per pipeline class. A CI account that deploys to staging should not carry production cluster-admin rights. Run shift-left security checks—Trivy image scans and gitleaks secret scans—as early DAG tasks before any deploy step.

CI Tool Fit MatrixLow K8s maturityHigh K8s maturityOps complexityGitLab CILow ops, VM runnersArgo WorkflowsK8s-native DAG CITektonSupply-chain focus
Argo Workflows for CI pipelines sits between low-ops GitLab CI and Tekton's Kubernetes-native supply-chain tooling.

How do you debug failed Argo Workflow CI runs in production?

Failed CI on Kubernetes feels opaque until you learn three commands. Treat Argo like any other production service—you need logs, events, and a retry path.

Essential debugging commands

# List recent workflows
argo list -n argo

# Stream logs from a failed step
argo logs -n argo my-workflow-abc123 --step test

# Describe the workflow for node-level errors
argo get -n argo my-workflow-abc123

# Inspect the underlying pod
kubectl describe pod -n argo my-workflow-abc123-test-1234567

Common failure modes I have seen on client Kubernetes migrations:

  • Image pull errors — private registry credentials missing from the namespace.
  • OOMKilled test pods — PHPUnit or npm test exceeds default memory limits; raise resources.limits.memory.
  • Volume mount races — parallel tasks writing to the same ReadWriteOnce PVC; use artifacts instead.
  • Stale workflow controller — ConfigMap change without controller restart.
  • RBAC denied — ServiceAccount lacks permission to create pods or read secrets.

Enable workflow archiving to S3 so you can compare failed and successful runs side by side. The Argo UI—installed via the same manifest bundle—shows DAG status with red/green nodes. It beats parsing JSON in a terminal during a Friday deploy.

For JSON log payloads from test runners, paste them into the JSON formatter to spot assertion failures quickly. Regex-heavy PHPUnit output sometimes benefits from the regex tester when you build log-parsing scripts.

Top CI Failure PointsOOMKilledRaise memory limitsImagePullBackOffFix registry secretRBAC DeniedServiceAccount roleMissing ArtifactsConfigure S3 repositoryPVC ConflictsUse S3 artifacts insteadFix: argo logs + kubectl describe podCheck controller ConfigMap reload
Production Argo Workflows CI failures usually trace to resource limits, registry auth, RBAC, or artifact storage—not application bugs.

On projects like Adventure Third Pole Trek, where Laravel and Livewire power booking flows, reliable CI is non-negotiable. A broken pipeline that blocks a hotfix during trekking season costs real revenue. Invest in alerting—Prometheus metrics from the workflow controller plus Slack notifications on failure.

Key Takeaways

  • Argo Workflows for CI pipelines maps each build stage to an ephemeral Kubernetes pod orchestrated by a DAG.
  • Install the controller in a dedicated namespace, configure S3-compatible artifact storage, and promote tested YAML to WorkflowTemplates.
  • Pair Argo Events with Git webhooks for automatic runs; never store secrets in plain Workflow specs.
  • Choose Argo over GitLab CI when Kubernetes is your deployment plane; keep GitLab CI for VM-based Laravel deploys with Deployer.
  • Debug with argo logs, argo get, and kubectl describe pod—most failures are infra, not code.
  • Align CI clusters with staging/production regions to cut image pull latency and simplify RBAC boundaries.

People Also Ask

Can Argo Workflows replace Jenkins or GitLab CI entirely?

It can replace the execution layer if every build runs on Kubernetes. Most teams keep GitLab or GitHub for code review and use Argo only for cluster-native build and deploy steps. Full replacement makes sense when you standardise on the Argo suite—Workflows, Events, CD, and Rollouts—and have staff to operate it.

Does Argo Workflows support Docker-in-Docker builds?

Yes, but Kaniko or BuildKit sidecars are safer on locked-down clusters. DinD requires privileged pods, which many security policies block. Kaniko builds images without a Docker daemon and fits the ephemeral pod model better.

How much does running CI on Argo Workflows cost?

Cost follows Kubernetes node usage. A small team running ten five-minute pipelines daily on three spot-instance nodes might spend USD 30–80/month (~Rs 4,000–11,000). Heavy parallel test suites on on-demand instances cost more. Compare that to managed CI minutes before you migrate.

Is Argo Workflows the same as Argo CD?

No. Argo Workflows orchestrates jobs—CI steps, data pipelines, batch tasks. Argo CD syncs Kubernetes manifests from Git—a deploy tool. They complement each other: Workflows builds and tests the image; CD promotes the manifest pointing to that image tag.

Ship Kubernetes-native CI with confidence

Argo Workflows for CI Pipelines earns its place when Kubernetes is already your runtime and you want DAG parallelism without maintaining a farm of CI VMs. Start with one service, a clone-test-build WorkflowTemplate, and S3 artifacts. Add Argo Events once manual submits work. Keep GitLab CI for projects that deploy to single servers until a cluster migration is real—not aspirational.

If you want help designing a CI path—from GitLab CI on EC2 to Argo on Kubernetes—contact us or review our enterprise application development and testing and optimization services. Read related guides on GitHub Actions vs GitLab CI, CI/CD secrets management, and Bitbucket Pipelines to pick the right entry point for your team.

Frequently Asked Questions

Argo Workflows is a CNCF-graduated Kubernetes workflow engine. For CI, each lint, test, and build stage runs as an ephemeral pod inside a Workflow CRD, chained as a DAG or sequential steps. You define jobs in YAML WorkflowTemplates and trigger them from Git webhooks or Argo Events.

Create a dedicated namespace, usually argo, then apply the official manifest bundle. The article uses v3.6.2: kubectl create namespace argo, then kubectl apply -n argo -f the release install.yaml URL. Install the argo CLI from the same release tag. After install, patch the workflow-controller ConfigMap if you need durable artifact storage beyond the default in-cluster repository.

Cost follows Kubernetes node usage, not a per-minute CI SaaS bill. A small team running ten five-minute pipelines daily on three spot nodes might spend USD 30–80/month (~Rs 4,000–11,000). Heavy parallel test suites on on-demand instances cost more.

It can replace the execution layer when every build runs on Kubernetes. Most teams keep GitLab or GitHub for code review and use Argo only for cluster-native build and deploy steps. Full replacement makes sense when you standardise on the Argo suite—Workflows, Events, CD, and Rollouts—and have staff to operate it.

No. Argo Workflows orchestrates jobs—CI steps, data pipelines, batch tasks. Argo CD syncs Kubernetes manifests from Git—a deploy tool. They complement each other: Workflows builds and tests the image; CD promotes the manifest pointing to that image.

All three can lint, test, and deploy a Laravel 13 app on PHP 8.3, but the operational model differs. Argo uses Workflow CRDs with native DAG parallelism and fits teams already on Argo CD or Events. Tekton adds supply-chain signing via Chains and suits pure K8s-native CI. GitLab CI stays simpler for GitLab-centric teams with minimal Kubernetes ops, VM runners, or shared hosting deploys.

Define a YAML Workflow with spec.templates and an entrypoint. For CI, use dag templates to run steps in parallel or sequence. A typical Laravel pipeline chains git-clone, composer install, parallel lint and PHPUnit, then a Kaniko image build. Share data between pods via volumeClaimTemplates or artifacts. Submit with argo submit and promote stable YAML to a reusable WorkflowTemplate with parameters for branch and PHP version.

Edit the workflow-controller ConfigMap in the argo namespace. Argo supports S3-compatible storage, GCS, Azure Blob, and Artifactory. For AWS or MinIO, set bucket, endpoint, region, and reference credentials via Kubernetes Secrets. Reload the controller after changes. Without durable storage, later DAG steps in different pods cannot consume outputs from earlier steps.

Yes, but Kaniko or BuildKit sidecars are safer on locked-down clusters. Docker-in-Docker requires privileged pods, which many security policies block. Kaniko builds container images without a Docker daemon and fits the ephemeral pod model Argo uses for CI steps.

Use Argo Events in the same cluster. Create an EventSource with a GitHub or GitLab webhook endpoint, then a Sensor that submits your WorkflowTemplate on push. Expose the webhook through Ingress with TLS, validate webhook signatures before the Sensor fires, and filter by path on monorepos so only changed services rebuild.

Never embed registry passwords or API keys in Workflow YAML. Mount Kubernetes Secrets as environment variables or files. For production, integrate HashiCorp Vault or your cloud provider's secret manager. Create a dedicated ServiceAccount per pipeline class—a staging deploy account should not carry production cluster-admin rights.

Choose Argo when Kubernetes already hosts your apps, you want CI pods colocated with staging clusters, need DAG parallelism, or want one orchestrator for CI, data pipelines, and batch jobs. Keep GitLab CI for VM-based Laravel deploys with Deployer on shared EC2, law-firm portals on a single VPS, or teams with no cluster ops capacity.

Start with argo list to see recent workflows, argo logs with --step for the failed stage, and argo get for node-level errors. Then kubectl describe pod on the underlying pod. Enable workflow archiving to S3 to compare failed and successful runs. The Argo UI shows DAG status with red and green nodes, which beats parsing JSON in a terminal during a deploy.

On Kubernetes CI migrations I have seen image pull errors from missing private registry credentials, OOMKilled test pods when PHPUnit exceeds default memory limits, volume mount races when parallel tasks write to the same ReadWriteOnce PVC, stale workflow controllers after ConfigMap edits without restart, and RBAC denied when the ServiceAccount lacks pod or secret permissions. Most failures trace to infra, not application code.

DAG templates let independent stages run in parallel—lint and unit tests simultaneously after composer install, with the image build waiting until both pass. That cuts queue time on busy monorepos and isolates flaky steps so one failing integration test does not starve unrelated builds. Sequential-only pipelines underuse cluster capacity when stages have no dependency on each other.

Share this article

0 Comments

Leave a comment

Your email is not published. Comments appear once they have been read. Sign in to have your details filled in.

Quick Contact Options
Choose how you want to connect me: