Deploying with Codefresh
Kubernetes-native CI/CD platform optimized for container and Helm deployments.
CI/CDIntermediate
Why
Codefresh has first-class Helm and Argo CD support with built-in container registry and caching. 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
Kubernetes-heavy teams wanting integrated registry, Helm, and GitOps in one platform. 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
# codefresh.yml
version: '1.0'
stages:
- build
- deploy
steps:
BuildImage:
type: build
stage: build
title: Build Docker image
image_name: myorg/app
tag: ${{CF_BRANCH_TAG_NORMALIZED}}
DeployHelm:
title: Deploy via Helm
stage: deploy
type: helm
arguments:
chart_name: myapp
chart_repo: my-repo
release_name: myapp
kube_context: prod-cluster
cmd: upgrade --install --set image.tag=${{CF_BRANCH_TAG_NORMALIZED}}
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
# Codefresh GitOps with Argo CD
steps:
SyncArgoCD:
title: Sync Argo CD app
type: argocd-sync
arguments:
app_name: myapp
server: argocd.example.com
token: ${{ARGOCD_TOKEN}}
Common Problems
- ⚠Helm chart not found — verify chart repo is added
- ⚠Kube context missing — add cluster in Codefresh UI
- ⚠Configuration drift between environments — use infrastructure-as-code (Terraform/Pulumi) to keep dev/staging/prod identical
Best Practices
- ✓Use parallel steps — speed up independent test suites
- ✓Use Codefresh runtime shared steps — DRY pipeline logic
- ✓Set up health checks and graceful shutdown — handle SIGTERM to drain in-flight requests before exit