Skip to content
Back to Deployment

Deploying with Harness

Enterprise CI/CD platform with pipeline orchestration, feature flags, and cloud cost management.

CI/CDAdvanced

Why

Harness unifies CI, CD, feature flags, and cost management in one platform with GitOps support. DORA's 2024 State of DevOps report shows elite teams deploy 973x more frequently than low performers.

CI/CD pipelines with automated testing reduce change failure rate to 5-15% versus 40-60% for manual deployments.

When

Enterprise teams needing end-to-end delivery with governance and cost visibility. Avoid complex pipeline orchestration for repos with fewer than 5 contributors — a pre-commit hook + GitHub Actions suffices.

Skip self-hosted runners unless you need GPU or VPN access.

How

# Harness pipeline YAML (excerpt) pipeline: name: deploy-prod stages: - stage: name: Build steps: - step: type: BuildAndPushDockerRegistry spec: connectorRef: dockerhub repo: myorg/app tags: ["<+pipeline.executionId>"] - stage: name: Deploy strategy: canary: percentages: [25, 50, 100] steps: - step: type: KubernetesRollingDeployment spec: cluster: prod-cluster 4. Verify deployment — curl -I https://your-app.example.com 5. Monitor logs — check for errors in first 5 minutes 6. Rollback if needed — revert to previous version

Example

# Harness CLI harness deploy --account=$ACCOUNT \ --org=$ORG --project=$PROJECT \ --pipeline=deploy-prod \ --env=production

Common Problems

  • ⚠Connector auth failing — verify delegate can reach the service
  • ⚠Canary stuck — check verification providers (AppDynamics/Prometheus)
  • ⚠Configuration drift between environments — use infrastructure-as-code (Terraform/Pulumi) to keep dev/staging/prod identical

Best Practices

  • ✓Use delegates in each VPC — avoid network egress costs
  • ✓Use deployment verification — auto-rollback on anomaly
  • ✓Set up health checks and graceful shutdown — handle SIGTERM to drain in-flight requests before exit

FAQ