Saturday, March 7, 2026

Harness | You Should Know These Concepts

Harness is a modern CI/CD and DevOps platform that automates software delivery using AI/ML-driven deployment verification, continuous integration, continuous delivery, and cloud cost management.

Key features
  1. Continuous Integration (CI)
  2. Continuous Delivery (CD)
  3. Feature Flags
  4. Cloud Cost Management
  5. Security Testing Orchestration
  6. GitOps support
  7. Automated Rollback using ML verification

Example:

Harness is a software delivery platform that automates CI/CD pipelines and uses machine learning for automated verification and rollback of deployments. It supports multiple deployment strategies such as canary, blue-green, and rolling deployments.


Core modules in Harness -

Important Harness modules include:

ModulePurpose
CIBuild and test automation
CDDeployment automation
Feature FlagsRelease features gradually
Cloud Cost ManagementOptimize cloud spending
STOSecurity testing orchestration
GitOpsKubernetes Git-based deployment

Harness Pipeline -

A pipeline in Harness is a series of automated steps used to build, test, and deploy applications.

Components
  • Stages
  • Steps
  • Triggers
  • Approvals
  • Rollback steps

Example flow:

Code Commit → Build → Test → Artifact → Deploy → Verify → Rollback if needed

Stage in Harness -

A Stage is a logical grouping of steps within a pipeline that represents a phase of the delivery process.

Common stages
  • Build Stage
  • Deployment Stage
  • Approval Stage
  • Security Scan Stage

Example:

Pipeline
├── Build Stage
├── Test Stage
└── Deploy Stage

Deployment strategies Harness supports -

Harness supports several deployment strategies:

StrategyExplanation
RollingDeploy gradually to instances
Blue-GreenSwitch traffic between environments
CanaryDeploy to small subset first
RecreateStop old version then deploy new
ShadowMirror traffic to new version

Example:

In a Canary deployment, a small percentage of traffic is routed to the new version to validate its performance before a full rollout.


Harness Continuous Verification (CV) -

Continuous Verification uses machine learning to analyze application metrics and logs during deployment to detect anomalies.

It integrates with tools like:
  • Prometheus
  • Datadog
  • Splunk
  • New Relic

If anomalies are detected:

  • Harness automatically rolls back the deployment.


Harness Delegate -

A Delegate is a lightweight service installed in your infrastructure that performs tasks on behalf of Harness.

In simple words, Delegate is an agent of Harness who perform all the steps required for deployment on infrastructure.

Harness itself does not directly access your infrastructure; instead, the delegate performs those operations locally and communicates results back to Harness.



Responsibilities
  • Execute pipeline steps
  • Communicate with infrastructure
  • Connect with artifact repositories
  • Perform deployments

Example:
A Delegate in Harness is a lightweight agent installed in the target infrastructure that executes pipeline tasks such as deployments, integrations, and scripts execution. It acts as a secure communication bridge between the Harness platform and the infrastructure resources.


Connectors in Harness -

Connectors allow Harness to connect with external systems.

Examples
  • Git repositories (like stash)
  • Artifact registries (like nexus)
  • Cloud providers (like GCP, Azure or AWS)
  • Kubernetes clusters

Common integrations:

  • GitHub
  • Docker Hub
  • Amazon Web Services
  • Kubernetes


Infrastructure Definition in Harness -

Infrastructure Definition defines where the application will be deployed.

Examples
  • Kubernetes cluster
  • AWS EC2
  • Azure VM
  • Google Cloud

It includes:

  • Cluster details
  • Namespace
  • Deployment environment


GitOps in Harness -

GitOps is a deployment method where Git repositories act as the single source of truth for infrastructure and application configuration.

Harness GitOps integrates with:

  • Argo CD
  • Flux

Workflow:

Developer commit → Git repo → GitOps tool → Kubernetes cluster

Alternate:
You can create  trigger inside pipeline triggers using Github webhook, that will trigger your pipeline execution on code commits.


Rollback in Harness -

Rollback happens automatically when:

  1. Deployment verification fails
  2. Error thresholds are crossed
  3. Manual rollback is triggered

Steps:

  1. Harness detects failure
  2. Stops current deployment
  3. Restores previous stable version


Harness Templates -

Templates allow reusable pipeline components.

Example reusable templates:

  • Deployment step
  • Security scan
  • Build process

Benefits:

  • Standardization
  • Reusability
  • Reduced configuration errors


Harness Triggers -

Triggers automatically start pipelines based on events.

Common triggers:

  • Git commit
  • Pull request
  • Schedule
  • Webhook

Example:

Git Push → Trigger Pipeline → Build + Deploy

Difference between Harness and Jenkins -

FeatureHarnessJenkins
SetupSaaS / ManagedSelf-hosted
AI verificationYesNo
UIModern UIBasic
Deployment strategiesBuilt-inPlugin based
RollbackAutomatedManual scripting

Secrets in Harness -

Secrets store sensitive information securely in encrypted form and decrypted when to use.
Or you can ingrate external store like AWS Secret Manager, Secret Vault etc.

Examples:

  • API keys
  • Passwords
  • Tokens

Harness integrates with secret managers like:

  • HashiCorp Vault
  • AWS Secrets Manager


Harness supports Kubernetes deployments -

Harness supports multiple Kubernetes deployment types:

  • Kubernetes Rolling Deployment
  • Kubernetes Canary Deployment
  • Helm Chart Deployment
  • GitOps deployment

Tools used:

  • Helm
  • Kubectl


Advantages of using Harness -

Advantages include:

  • AI-driven deployment verification
  • Automatic rollback
  • Reduced deployment failures
  • Built-in security scanning
  • Native cloud and Kubernetes support

No comments:

Post a Comment

Node | Cluster Vs Worker Threads

Cluster: Multiple processes (scale app across CPU cores) Worker Threads: Multiple threads (handle CPU-heavy work inside one process) Cluster...